Hi,
I have a view which processes a multi-part form and whose behaviour
varies depending on the content types of the uploaded files. I've
written some tests for that view as follows:
post_data = {
'name1': 'blah',
'file_field1': image_data,
}
respo
Looks like I missed that... Thanks, it's great!
-M.
On Fri, Jan 23, 2009 at 12:05 AM, szunyog wrote:
>
> > But how can I do the following?:
> >
> > p = Page.objects.filter(tags in [ 'Tag1', 'Tag2' ])
> >
> > (of course it doesn't work, but it hopefully explains what I need..)
>
> check this:
There is a very good solution for tagging
http://code.google.com/p/django-tagging/
try this, it will save you a waste of time
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this grou
On 18 Sty, 12:06, Malcolm Tredinnick wrote:
> Wait a few days until ticket #7210 is resolved and you'll be able to use
> references to other fields as rhs values in filters. The work for that
> is nearly complete, so it's pretty close to being committed. I'm fairly
> sure that will help you there
On Jan 23, 1:47 am, Alex Koshelev wrote:
> You don't need to "call" form second time:
>
> pForm = PersonForm(request.POST.copy(), instance=p)
>
> And pForm is the ready to use instance of form.
>
Thanks for that. Would you know off hand where in the documentation I
could find that? I l
Hi Arbi,
I encountered a similar problem a while ago when I tried to install
mod_python, MySQLdb on my OS X. What seems to be the problem is that,
by default mysqldb is only running on 32-bit, so you have to make sure
that your MySQL, mod_python, MySQLdb and Apache running on 32-bit
mode
You don't need to "call" form second time:
pForm = PersonForm(request.POST.copy(), instance=p)
And pForm is the ready to use instance of form.
On Fri, Jan 23, 2009 at 8:29 AM, waltbrad wrote:
>
> Hi folks. PersonForm is a modelform. I'm trying to validate data by
> calling an instanc
Try to check your EMAIL_ settings.
On Fri, Jan 23, 2009 at 8:55 AM, Oleg Oltar wrote:
> Hi! I am getting a strange error when trying to reset, forgotten password.
> I am using it this way
>
># Password resend group
>(r'^reset/(?P[0-9A-Za-z]+)-(?P.
Oh, and my model
class Category(models.Model):
parent = models.ForeignKey('self', null=True)
slug = models.SlugField()
title = models.CharField(max_length=50)
def __unicode__(self):
return self.title
--~--~-~--~~~---~-
Lets say I have a bunch of categories which can optionally contain
subcategories... What would be the ideal way to go about a) preparing
this data for my templates, and b) displaying this data in m templates
Here is what I currently have.. it feels dirty
-
I've been struggling with this for the past couple hours now and I
really don't know what could be wrong. I'm simply trying to get
Javascript to communicate text with Flash. I found this great example
with this source
http://blog.circlecube.com/wp-content/uploads/2008/02/ActionscriptJavascriptCom
Hi! I am getting a strange error when trying to reset, forgotten password.
I am using it this way
# Password resend group
(r'^reset/(?P[0-9A-Za-z]+)-(?P.+)/$',
'django.contrib.auth.views.password_reset_confirm',
{'template_name':'registration/password_
Hi folks. PersonForm is a modelform. I'm trying to validate data by
calling an instance of PersonForm. (This is from Sam's 24 hour, and
I've modified the example to accommodate the 1.0 changes.) So,
if request.method == 'POST':
if request.POST['submit'] == 'update':
message = 'U
Here's one way. There's likely a cleaner option somewhere else:
from django.core.urlresolvers import get_resolver
r = get_resolver('mysite.urls')
for pattern in r._get_url_patterns(): print pattern
That works, at any rate.
Yours,
Eric
On Jan 23, 2009, at 3:55 AM, NoviceSortOf wrote:
>
>
>
On Thu, 2009-01-22 at 15:17 -0800, davenaff wrote:
> What is the best way to disable a specific middleware when running
> django tests?
>
> This ticket was designated wontfix, so I get test failures on the auth
> tests every time I run our test suite:
> http://code.djangoproject.com/ticket/9172#c
On Thu, 2009-01-22 at 12:01 -0800, May wrote:
> Hello,
>
> I set up a windows XP(python 2.5, apache 2.2) startproject called
> myprograms and used this code in http.conf (this works and server
> starts):
>
> SetHandler python-program
> PythonPath "['C:/django'] + sys.pat"
If this is a cut and p
On Thu, 2009-01-22 at 06:16 -0800, Polat Tuzla wrote:
> You may also want to make sure that you know whether your Flash/
> ActionScript components require UTF-8 with BOM (Byte-order Mark) or
> not.
>
> Let me try to explain more clearly:
> In my case, I had i18n problems when a flash component re
On Thu, 2009-01-22 at 19:46 +0530, Kenneth Gonsalves wrote:
> On Thursday 22 Jan 2009 7:31:07 pm Malcolm Tredinnick wrote:
> > But please do understand that this isn't a
> > change that is necessarily universally better for everybody. It does
> > harm the content presentation, for example.
>
> o
After a preliminary reading of your answer, the second solution seems
like what I am trying to do. Basically this is a simple Track and
Field competition manager, and one year a student will compete as a
midget and get a result for the 100m dash, and the next year compete
as a junior and get a res
Thank you for the tip. I was actually in the middle of debugging a
problem which I think may have been solved by this post. I used
urlsafe_b64encode() and urlsafe_b64decode because a URL cannot contain
any non-ASCII characters (can it?). I could also have used the normal
b64 functions, but I wante
On Fri, Jan 23, 2009 at 5:31 AM, Delta20 wrote:
>
> Fixtures are geared towards unit testing; I'm wondering if they are
> considered a good way to populate the database with some initial
> default values.
>
> For example, say we have a model TicketState, and the applications
> must be guaranteed
the urlpatterns += line looks right, but I don't really know what
you're doing with the # lines. Could you post the full
mysite.myproject.urls file?
On Jan 22, 9:18 am, NoviceSortOf wrote:
> Looking at mysite.myproject.urls I have...
>
> urlpatterns += patterns('', (r'^profiles/', include
> ('p
What is the best way to disable a specific middleware when running
django tests?
This ticket was designated wontfix, so I get test failures on the auth
tests every time I run our test suite:
http://code.djangoproject.com/ticket/9172#comment:12
I'd prefer not to have to edit settings.py every tim
On Thu, Jan 22, 2009 at 10:57 PM, jason.t.stein wrote:
>
> Perhaps this is an sql question, and not a Django question so please
> have patience. I am writing a student management app that keeps track
> of student events. The relevant tables are:
>
> class Student(models.Model):
> first_name = mo
On Thu, Jan 22, 2009 at 10:37 PM, Gath wrote:
>
> In Django how can i return the total number of items (count) that a
> related to another model, e.g the way stackoverflow.com does a list of
> questions then on the side it shows the count on the answers related
> to that question.
>
> This is eas
I've managed to successfully install django running fcgi on my shared
host, but I've got to warn you, it's not usually an easy path. Took me
ages.
It's usually much, much easier to use a django-friendly host such as
webfaction, but anyway, here a couple of points from a non-expert.
1) Are you ty
On Thu, 2009-01-22 at 11:55 -0800, Abe wrote:
> I would like to run a function (in my case, send an email summarizing
> recent activity) when a user logs out *or* when their session
> expires. Is there an easy way to do it without making a new version
> of the Session class?
No.
Regards,
Malcol
> But how can I do the following?:
>
> p = Page.objects.filter(tags in [ 'Tag1', 'Tag2' ])
>
> (of course it doesn't work, but it hopefully explains what I need..)
check this: http://docs.djangoproject.com/en/dev/ref/models/querysets/#in
Regards,
Tibor
--~--~-~--~~~
2009/1/22 Karen Tracey :
> Ah, you have in your search_fields for SchedaBilancioGenereOptions
> 'impresa', which is a ForeignKey. You need to specify what field within the
> related model you want to search, so 'impresa__fieldname'. (If there are
> multiple fields you need to list each explicit
If learning-by-doing is your thing I would recommend having a look at
www.nettuts.com
and especially the css tutorials:
http://nettuts.com/tutorials/site-builds/from-psd-to-html-building-a-set-of-website-designs-step-by-step/
http://nettuts.com/tutorials/tools-and-tips/how-to-theme-any-cms-using-
Hi,
You should create an admin class and override its queryset method.
Something like this:
class EntryAdmin(admin.ModelAdmin):
...
def queryset(self, request):
qs = qs = super(EntryAdmin, self).queryset(request)
qs = qs.filter(specify your filter criteri
First off, hi everybody! ;-) I'm new to Python and I'm new to
Django. Just testing things out for now. I have a huge experience
with Perl but I'm getting fed up with the overloaded syntax and all
those "$"-s and "@"-s and "%"-s and "@{ $ }"-s etc. (though I
sometimes miss them in Python, but t
Hi Malcolm,
Thank you VERY much for taking the time to explain this to me. It
makes perfect sense and since yesterday I've delved a bit deeper (than
ever) into the django code itself to understand a little more. You are
ABSOLUTELY right to point out that I'm in user-beware country. I don't
apolog
Fixtures are geared towards unit testing; I'm wondering if they are
considered a good way to populate the database with some initial
default values.
For example, say we have a model TicketState, and the applications
must be guaranteed to have two TicketStates representing the states
"Open" and "C
http://pinaxproject.com/
On Fri, Jan 23, 2009 at 1:56 AM, Rodrigo C. wrote:
>
> I need to create an Intranet for a client. I would like to include
> some facebook-like functionality, such as being able to create and
> join networks, setting permissions based on membership in said
> networks, bein
I need to create an Intranet for a client. I would like to include
some facebook-like functionality, such as being able to create and
join networks, setting permissions based on membership in said
networks, being notified when a friend or someone in your network
updates his status, writes somethin
I would like to run a function (in my case, send an email summarizing
recent activity) when a user logs out *or* when their session
expires. Is there an easy way to do it without making a new version
of the Session class?
--~--~-~--~~~---~--~~
You received this me
I managed to set debug to false and spend an hour trying to understand
this error:
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/django/template/defaulttags.py", line 880, in
load
(taglib, e))
TemplateSyntaxError: 'openid_tags' is not a valid tag lib
If you have a Mac I recommend CSSEdit which allows you to analyse the
css that applies to each element on a page (locally or online) and
changes show immediately.
On Jan 21, 8:52 am, Gath wrote:
> Guys,
>
> Its seems the best way to do templates in Django is via plain html and
> css, but am hav
Hello,
I set up a windows XP(python 2.5, apache 2.2) startproject called
myprograms and used this code in http.conf (this works and server
starts):
SetHandler python-program
PythonPath "['C:/django'] + sys.pat"
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE myprograms
Hi All,
I am pleased to announce the release of Agile Software Project and
Product Management tool - WoodRanch Agile Projects (WRAP), written
in Django.
http://wrap.woodranchtech.com
Please register here http://wrap.woodranchtech.com/register/ for the
free trial.
It is a pleasure developing
* Is there a way to see a full URLConf list of all the imported URLs,
in
an application?
This seems it would be a big debuging help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
I'll try simplifying the example further in case anyone is able to
help...
> Here's the problem code:
class Xeme(models.Model):
text = models.CharField(max_length=150, db_index=True)
components = models.ManyToManyField(
'self', symmetrical=False, blank=True,
related_name=
Ok finally got it. David Zhou above, earlier mentioned adding static
file directory to css link (ie, ) but when i did that it didn't work. I
must have had something wrong somewhere else. Anyway, i made some more
changes after reading info here:
http://stackoverflow.com/questions/446026/django-how
I think getting the firebug plug-in for firefox and playing around and
looking at other people's code has been most beneficial to me
recently.
On Jan 21, 3:52 am, Gath wrote:
> Guys,
>
> Its seems the best way to do templates in Django is via plain html and
> css, but am having a problem in unde
ah ok. good catch. My MEDIA_ROOT = C:\dev\proj. But my media directory
is actually in my app directory, one directory down. I fixed
MEDIA_ROOT to equal C:\dev\proj\app and still not having any luck. my
use of -\ in directory structure example is just to indicate a folder
in directory tree. Let me
Looking at mysite.myproject.urls I have...
urlpatterns += patterns('', (r'^profiles/', include
('profiles.urls')), )
But can't get the profiles.urls to import
My URLconf list includes
# ^accounts/ ^activate/(?P\w+)/$
# ^accounts/ ^login/$
# ^accounts/ ^logout/$
# ^accounts/ ^register/$
# ^acco
Oh, Thank you, Karen!! Yes, that was the problem.
May
On Jan 22, 9:12 am, Karen Tracey wrote:
> On Thu, Jan 22, 2009 at 11:55 AM, May wrote:
>
> > Hello,
>
> > I'm trying to set up the Apache server with mod_python. The Apache
> > server works, until I had the following code to the bottom of
On Thu, Jan 22, 2009 at 11:55 AM, May wrote:
>
> Hello,
>
> I'm trying to set up the Apache server with mod_python. The Apache
> server works, until I had the following code to the bottom of
> http.conf file:
>
> SetHandler python-program
> PythonPath "['C:/django'] + sys.path"
If this is a li
Sorry that should be {{MEDIA_URL}}
Dj Gilcrease
OpenRPG Developer
~~http://www.openrpg.com
On Thu, Jan 22, 2009 at 9:30 AM, Puneet Madaan wrote:
> beside you need to correct settings.py to
>
> SETTINGS_FILE_FOLDER = os.path.dirname( os.path.abspath(__file__))
>
>
> On Thu, Jan 22, 2009 at 5
Hello Tonu,
Yes, I tried that as well and still the server won't start.
Thanks,
May
On Jan 22, 9:01 am, Tonu wrote:
> I wonder if you need SetHandler None? Try eliminating those two
> lines. Other source of information for troubleshooting is apache
> error log file.
>
> Tonu
>
> On Jan 22,
I wonder if you need SetHandler None? Try eliminating those two
lines. Other source of information for troubleshooting is apache
error log file.
Tonu
On Jan 22, 10:55 am, May wrote:
> Hello,
>
> I'm trying to set up the Apache server with mod_python. The Apache
> server works, until I had th
well at my side it works well on both *nix and windoof platforms... here is
what I use on my projects...
settings.py
--
import platform
import os
PROJECT_DIR = os.path.dirname( os.path.abspath(__file__))
MEDIA_ROOT = os.path.join(PROJECT_DIR, 'static')
---
urls.py
---
Ad addendum to message:
This is a windows XP server.
May
On Jan 22, 8:55 am, May wrote:
> Hello,
>
> I'm trying to set up the Apache server with mod_python. The Apache
> server works, until I had the following code to the bottom of
> http.conf file:
>
> SetHandler python-program
> PythonPath
Thanks Malcom,
Looks like sorted in combination with the operator module is the key
to my problem. Now I can do:
import operator
vehicle_list = Vehicle.objects.all().select_related(depth=1)
vehicles = list(sorted(vehicle_list, key=operator.attrgetter
('model_year or whatever')))
...and do vehi
Hello,
I'm trying to set up the Apache server with mod_python. The Apache
server works, until I had the following code to the bottom of
http.conf file:
SetHandler python-program
PythonPath “['C:/django'] + sys.path”
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mypr
Thanks but no change.
On Jan 22, 11:30 am, Puneet Madaan wrote:
> beside href="{MEDIA_URL}css/styles.css">
> you need to correct settings.py to
>
> SETTINGS_FILE_FOLDER = os.path.dirname( os.path.abspath(__file__))
>
>
>
> On Thu, Jan 22, 2009 at 5:26 PM, john wrote:
>
> > Thanks but no change
I am trying to write a small program that imports delicious bookmarks
into the Django project's database. When I try the commands using
manage.py shell , then they work, but when I put the commands into a
file "feed.py" and try them I receive an error: " ImportError: No
module named django_bookma
You can also replace the following steps by the 'render_to_string'
shortcut method available in the 'django.template.loader' module:
> - explicitely load the template
> - render it and store the result
then, as bruno indicated, just reencode and serve :)
--~--~-~--~~~
beside
you need to correct settings.py to
SETTINGS_FILE_FOLDER = os.path.dirname( os.path.abspath(__file__))
On Thu, Jan 22, 2009 at 5:26 PM, john wrote:
>
> Thanks but no change.
>
> On Jan 22, 11:02 am, Dj Gilcrease wrote:
> > change
> >
> > to
> >
> >
> > Dj Gilcrease
> > OpenRPG Develo
Thanks but no change.
On Jan 22, 11:02 am, Dj Gilcrease wrote:
> change
>
> to
>
>
> Dj Gilcrease
> OpenRPG Developer
> ~~http://www.openrpg.com
>
> On Thu, Jan 22, 2009 at 8:53 AM, john wrote:
>
> > No matter what i do i can't get my css to load. 100% Frustrated with
> > Django. My index pag
Tim Daniel schrieb:
> I read something that it would be more
> efficient to store only the query and doing pickle?? I don't know how
> to do that, I've been looking in the docs and other posts but no clear
> explanation. So what I really want to know: which is the best way of
> handling this probl
change
to
Dj Gilcrease
OpenRPG Developer
~~http://www.openrpg.com
On Thu, Jan 22, 2009 at 8:53 AM, john wrote:
>
> No matter what i do i can't get my css to load. 100% Frustrated with
> Django. My index page loads when i request http://127.0.0.1:8000/ but
> it is not styled. Django dev serv
On Thu, Jan 22, 2009 at 10:53 AM, john wrote:
>
> No matter what i do i can't get my css to load. 100% Frustrated with
> Django. My index page loads when i request http://127.0.0.1:8000/ but
> it is not styled. Django dev server returns 404 in console for "GET /
> css/styles.css HTTP/1.1"
Try do
No matter what i do i can't get my css to load. 100% Frustrated with
Django. My index page loads when i request http://127.0.0.1:8000/ but
it is not styled. Django dev server returns 404 in console for "GET /
css/styles.css HTTP/1.1"
In my base template i have:
In my urls.py I have:
urlpatterns
On Thu, Jan 22, 2009 at 3:01 AM, Alessandro Ronchi <
alessandro.ron...@soasi.com> wrote:
>
> 2009/1/21 Karen Tracey :
>
> > Egads, they're huge. Any way you could cut that down to a small failing
> > example? Or at least mention which model you are trying the search on?
> > Also a traceback inst
It seems to me the that automatic mechanism mentioned in the docs
does not exist in django-registration but in its component
django-profiles, reading the source code I see this...
def create_profile(request, form_class=None, success_url=None,
template_name='profiles/create_pro
Although unmentioned in the django-registration docs, reading the
django-profiles code I see
a method called create_profile...which is intended for this purpose,
for now I'll try giving
that a try.
def create_profile(request, form_class=None, success_url=None,
template_name='p
Only Candidates from Mumbai/ India candidates can apply
We are having an Urgent opening for a leading MNC.
We are looking for Python Web Development/ programmers with Django.
LOCATION: Mumbai/ Andheri (E)
Looking for a quick response!
Talk to us on 9820160656 and send your CV's with your curren
On Fri, Jan 2, 2009 at 6:17 AM, Berco Beute wrote:
> - Stack. What would currently be a good combination webserver/protocol/
> database? Possible options: Lighttpd, Cherokee, apache, FastCGI,
> mod_python, wsgi, mysql, progress... I realize there is no 'best'
> solution, but I would like to hear
DragonSlayre,
django-thumbs fields act exactly the same way as any ImageField (the
inherit from ImageFIeld), so they can be blank and null. That
shouldn't be a problem.
Regards,
Antonio Melé
http://django.es/blog/
On 20 ene, 19:21, DragonSlayre wrote:
> Yeah, I had to add a related_name to m
I want to use FusionCharts on Django, and I know a widget
TGFusionCharts for turbogears. How to use it for Django?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
creecode:
I've tried your 2 suggestions with one with no results, and the second
suggestion perhaps i
did not understand enough of where the code should go to make it work.
** Trigger adding instanc
Django 1.0/django-registration .07 problems continue
***
Issue 1 - No module named urls occuring during registration form
completion.
Via the methodology listed by Karen above I was able to trace my
missing url
Perhaps this is an sql question, and not a Django question so please
have patience. I am writing a student management app that keeps track
of student events. The relevant tables are:
class Student(models.Model):
first_name = models.CharField(max_length=32)
last_name = models.CharField(max_len
"login_username" should be the attribute named "name", not "id".
On Dec 23 2008, 11:03 am, DragonSlayre wrote:
> I've created my own form:
>
>
> Login:
> Username:
>
> Password:
>
>
>
>
> I am mappying /accounts/login/ to a view of mine, which is then
> calling:
>
> if request.
Hello every one,
I am a new member in the Django community... But very beginner.
I spent my whole day yesterday trying to run the "python manage.py
syncdb" key but no success. I looked at many forums and this post
seemed to be nice :
http://www.mangoorange.com/2008/08/01/installing-python-mysqldb
Hi django-pros,
I'm nearly finishing my django web-app and I've got some questions:
1. I'm using pagination: from django.core.paginator import Paginator,
and then handling it all by myself, I do not want to use any other
modules or snipetts or so on. I'm using it to paginate the result of a
query
On Wed, Jan 21, 2009 at 7:27 PM, Mackenzie Kearl
wrote:
>
> On Jan 21, 11:14 am, Aneurin Price wrote:
>> (Apologies for the vague subject; I couldn't think how to summarise this :P)
>>
>> Hello all,
>>
>> I have an application where some models are inherited from others, like so:
>>Foo
>>
Well, first things first: set DEBUG=True in your settings.
The traceback you got there is saying there's an HTTP 500 error
somewhere, so it's looking for a 500.html template to use to display
that error. Django only tries to show that page if you have set
DEBUG=False. In this case, you need to
when I typed in: http://127.0.0.1:8000/admin/
I got:
Traceback (most recent call last):
File "C:\Python26\Lib\site-packages\django\core\servers
\basehttp.py", line 278, in run
self.result = application(self.environ, self.start_response)
File "C:\Python26\Lib\site-packages\django\core\s
On Thursday 22 Jan 2009 7:31:07 pm Malcolm Tredinnick wrote:
> But please do understand that this isn't a
> change that is necessarily universally better for everybody. It does
> harm the content presentation, for example.
ok - I wont raise this again - but please check out the comments on the I
You may also want to make sure that you know whether your Flash/
ActionScript components require UTF-8 with BOM (Byte-order Mark) or
not.
Let me try to explain more clearly:
In my case, I had i18n problems when a flash component rendered my
utf-8 encoded templates.
I had saved my templates as utf
On Thu, 2009-01-22 at 19:17 +0530, Kenneth Gonsalves wrote:
> On Thursday 22 Jan 2009 6:48:11 pm Malcolm Tredinnick wrote:
> > I think you have not described whatever problem it is that you're trying
> > to solve particularly well. "Index" has at least three different
> > meanings for the document
That works great, thanks!
bruno desthuilliers wrote:
> http://www.djangosnippets.org/snippets/1293/
> This may help:
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
Hi all,
I'm using django-tagging for a Banner model and since it's fairly widely
used I thought some people here may be able to help. I want to achieve
two things: find all the Banners related to ALL of a list of tags, and
final all the Banners related to ANY of a list of tags
This is my bann
On Thursday 22 Jan 2009 6:48:11 pm Malcolm Tredinnick wrote:
> I think you have not described whatever problem it is that you're trying
> to solve particularly well. "Index" has at least three different
> meanings for the documentation. I'm assuming you mean the content index
> (/dev/genindex/), b
Are you sure it is not just a property of that question class?
Storing a count property for that answers, and increase it every time got
new response?
It would be faster than go through the entire db for each question.
I am just guessing.
On Thu, Jan 22, 2009 at 1:37 PM, Gath wrote:
>
> In Dja
On Jan 22, 1:20 am, Malcolm Tredinnick
wrote:
>
> How is it wrong that when you want a custom form you have to actually
> write some code? Django cannot read your mind. It cannot possibly
> accommodate every single use-case of every person on the planet out of
> the box. It's designed to be exten
In Django how can i return the total number of items (count) that a
related to another model, e.g the way stackoverflow.com does a list of
questions then on the side it shows the count on the answers related
to that question.
This is easy if i get the questionid, i can return all answers related
I think this just started, and may be related to updating to 1.0.2.
Lately I've noticed update_object not updating properly. In
particular, I've noticed boolean fields changing. For example, I'll
have an "approved" field that's True, but when the user update the
info, "approved" is changing to Fal
On Thu, 2009-01-22 at 04:58 -0800, Lee wrote:
> Thanks a lot.
>
> I'd like to pass the dynamic value to the choices, like what you said
> in the last situation.
>
> Could you please give me some more instructions, I'm new in python and
> django.
I've given you a code fragment already to show ho
Well, I'd like to write some docs first, but hey ,)
I'm developing something on top of nose, to express my feelings, I
call it django-sane-testing. Grab nose 0.10 and sane testing from
http://devel.almad.net/trac/django-sane-testing/wiki/Releases and
enjoy usual nose features (test selection, pro
On Thu, 2009-01-22 at 18:31 +0530, Kenneth Gonsalves wrote:
> hi,
>
> wrt django documentation, why not load the index first - on the left?
Do you mean the thing labelled as "general index"? It would use up
valuable horizontal screen real-estate without adding a lot of value. On
every single pag
hi,
wrt django documentation, why not load the index first - on the left? Also it
would be helpful if the following links are at the top of the index:
Search
* Latest
* 1.0
* 0.96
* All
Browse
* Prev: django.contrib.webdesign
* Next: django-admin.py and manage.py
Thanks a lot.
I'd like to pass the dynamic value to the choices, like what you said
in the last situation.
Could you please give me some more instructions, I'm new in python and
django.
regards
Lee
On Jan 22, 11:21 pm, Malcolm Tredinnick
wrote:
> On Thu, 2009-01-22 at 03:54 -0800, Lee wrote
I have implemented a very basic Q object. Under controlled conditions,
it works great. Here it is:
class QCompare(models.Q):
""" QCompare object allows you to compare two fields of one or two
models
Example: queryset.filter(QCompare('>', Model1, 'field1', Model2,
'field2'))
"""
On Thu, 2009-01-22 at 03:54 -0800, Lee wrote:
> Hi, Malcolm
>
> Thanks for you reply. However, I'm still not clear.
>
> My code is :
>
> from django import forms
>
> class TestForm(forms.Form):
> title = forms.CharField( max_length=10 )
> selection = forms.CharField( widget=forms.Select )
2008/10/12 Alex Koshelev :
>
> There is not way track M2M field change with post_save signal. You can
> write your own derived M2M field class with needed hooks.
>
> On Oct 12, 9:01 pm, Viktor wrote:
>> Hi,
>>
>> I have three simple models Project and Member, where Project.member is
>> a ManyToMa
Hi, Malcolm
Thanks for you reply. However, I'm still not clear.
My code is :
from django import forms
class TestForm(forms.Form):
title = forms.CharField( max_length=10 )
selection = forms.CharField( widget=forms.Select )
f = TestForm(initial={"title": 'Test', 'selection':{'1':'a','2':'b'
1 - 100 of 111 matches
Mail list logo