Re: trying to do console testing of my models, "no module named X"

2010-06-24 Thread euan.godd...@googlemail.com
If you do: python manage.py shell you will get a python shell with all the necessary paths set up so that you can do your testing. You may also want to consider some sort of automated testing as it makes this sort of thing a lot easier and quicker. Euan On 24 June, 05:04, robinne wrote: > I ha

Re: noob syntax question

2010-06-24 Thread euan.godd...@googlemail.com
I'd add to Michael's comment that if you're unhappy with this syntax (I personally find it a bit odd in some cases), you can customize exactly what word is used there in your model definition. If you alter the choice model and add the "related_name" keyword to the foreign key definition, e.g.: cl

Re: Generate image and send to template

2010-06-24 Thread euan.godd...@googlemail.com
I can't understand the comments in your code, but it looks like some graph generating software. I think the problem you're having is that the first function returns a HttpResponse half way through (line 53), but then there is some further processing which will never be accessed. The second functi

Re: Sorting objects according to a field from a foreign field

2010-06-24 Thread derek
On Jun 22, 4:48 pm, Benedict Verheyen wrote: > On 22/06/2010 16:42, Daniel Roseman wrote: > > > > > As described in the documentation [1], you use the double-underscore > > syntax for sorting across relationships. > >     Call.objects.all().order_by('-priority__weight') > > > [1]:http://docs.djang

Re: M2M with Intermediary - Django Admin Support - Doesn't appear?

2010-06-24 Thread Victor Hooi
heya, Nuno: Thanks for the advice. I know how to add normal inlines to the home page for a model, via the "inlines" list in admin.py. However, how exactly do I add an inline formset to the Add Article page? I can override the template for the Add Article page, however, I don't think that's what

Re: Deploying Django with mod_wsgi

2010-06-24 Thread commonzenpython
i have ran into the same error i get using mod_wsgi, which is : ExtractionError at / Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: [Errno 13] Permission denied: '/.python-eggs' The Python egg cache directory is current

Re: Django Sphinx or haystack Xapian

2010-06-24 Thread Dmitry Dulepov
Hi! zweb wrote: > 2) Sphinx has slow index update. Updating index takes as much time > as building a new one. I have a Sphinx indexed form with 2 million posts. Indexing takes mess than 2 minutes. Is that considered slow? I use full rebuild of the index even 10 minutes. Incremental reindexing i

Re: Deploying Django with mod_wsgi

2010-06-24 Thread Kenneth Gonsalves
On Thursday 24 June 2010 13:45:51 commonzenpython wrote: > change the cache directory by setting the PYTHON_EGG_CACHE environment > variable to point to an accessible directory. > set the PYTHON_EGG_CACHE environment variable in your django.wsgi script to some directory that is writeable by apa

Re: Deploying Django with mod_wsgi

2010-06-24 Thread Tom Evans
On Thu, Jun 24, 2010 at 9:15 AM, commonzenpython wrote: > i have ran into the same error i get using mod_wsgi, which is : > > ExtractionError at / > Can't extract file(s) to egg cache > > The following error occurred while trying to extract file(s) to the > Python egg > cache: > >  [Errno 13] Perm

Deployment hesitation after James Bennett's post, WSGI or ...?

2010-06-24 Thread Dave E
I'm about to enter my first deployment learning curve, but after reading James Bennett's post 'Let’s talk about WSGI' (http://www.b- list.org/weblog/2009/aug/10/wsgi/) and further procrastinating by reading through a whole pile of (horribly varying) tutorials and WSGI guides, I'd like to know: 1.

How do i test django ratings in my project?

2010-06-24 Thread Gath
Hi, I have installed django ratings application in my project http://github.com/dcramer/django-ratings Am wondering how best can i test my app voting functionality, because django ratings is only allowing me to vote only once for the same user, object and Ip address. Is there a way i can disable

Re: Deployment hesitation after James Bennett's post, WSGI or ...?

2010-06-24 Thread Kai Diefenbach
Hi, On 2010-06-24 11:54:32 +0200, Dave E said: I'm about to enter my first deployment learning curve, but after reading James Bennett's post 'Let’s talk about WSGI' (http://www.b- list.org/weblog/2009/aug/10/wsgi/) and further procrastinating by reading through a whole pile of (horribly varying

Re: Deployment hesitation after James Bennett's post, WSGI or ...?

2010-06-24 Thread Daniel Roseman
On Jun 24, 10:54 am, Dave E wrote: > I'm about to enter my first deployment learning curve, but after > reading James Bennett's post 'Let’s talk about WSGI' (http://www.b- > list.org/weblog/2009/aug/10/wsgi/) and further procrastinating by > reading through a whole pile of (horribly varying) tutor

Re: Deployment hesitation after James Bennett's post, WSGI or ...?

2010-06-24 Thread Kenneth Gonsalves
On Thursday 24 June 2010 15:24:32 Dave E wrote: > I'm about to enter my first deployment learning curve, but after > reading James Bennett's post 'Let’s talk about WSGI' (http://www.b- > list.org/weblog/2009/aug/10/wsgi/) and further procrastinating by > reading through a whole pile of (horribly va

Re: Django Sphinx or haystack Xapian

2010-06-24 Thread euan.godd...@googlemail.com
We are in the process of switching from a custom Xapain installation to Solr as we found Xapian quite limited in its ability to do faceting, spelling suggestions, or highlighting. If you don't need any of those things, I would recommend Xapian (although I've not used it through Haystack). I have us

Re: Deployment hesitation after James Bennett's post, WSGI or ...?

2010-06-24 Thread Dave E
Thanks for all that. I'm going to: 1. go with a standard mod-wsgi setup in each Django site's VirtualHost container and check performance, 2. then look at Gunicorn, 3. then assess whether running another server for static files is (for my sites) worth it. (while testing, I'm delivering static

test database and unittesting

2010-06-24 Thread Rufman
When i do "Animal.object.create(name="dog")" in a unittest setup no row is added to the database, but if i do this in the normal code it works. The temporary test database is created, but the adding of objects does not work. I'm totally lost as to where the error could be. side note: i also had a

Re: Deployment hesitation after James Bennett's post, WSGI or ...?

2010-06-24 Thread Venkatraman S
On Thu, Jun 24, 2010 at 5:04 PM, Dave E wrote: > Thanks for all that. I'm going to: > > 1. go with a standard mod-wsgi setup in each Django site's VirtualHost > container and check performance, > > 2. then look at Gunicorn, > > 3. then assess whether running another server for static files is (fo

Re: test database and unittesting

2010-06-24 Thread Rufman
This must be a django.test.Testcase bug, because the same thing happens when i load fixtures, but not if i use unittest.Testcase On Jun 24, 1:42 pm, Rufman wrote: > When i do "Animal.object.create(name="dog")" in a unittest setup no > row is added to the database, but if i do this in the normal

Re: How to access the request inside a model manager's get_query_set?

2010-06-24 Thread derek
On Jun 23, 8:28 pm, derek wrote: > I would like to define a default manager for MyModel that always > filters all records (when the model is accessed from anywhere in my > application) based on data from the request: > > e.g. on the lines of: > > class MyModelManager(models.Manager): >     #overri

problem deserialization

2010-06-24 Thread irum
Hi, I am working on implementing a REST web service example of booking a hotel. It was supposed to be simple to start with but I am already badly stuck:) I am stuck with deserialization and serialization. I want to create a new resource when PUT is requested on booking. My GET method works perfe

IntegrityError: (1062, “Duplicate entry ‘1830327 -1792993’ for key ‘some_instance_A_id’”) but no UNIQ UE constraint

2010-06-24 Thread Tomasz Zieliński
Maybe someone here knows this problem: http://stackoverflow.com/questions/3079890/integrityerror-1062-duplicate-entry-1830327-1792993-for-key-some-instance ? It happens rarely, randomly (although it might not be really random) and currently I don't have idea what to look for to fix it (it also d

About raw sql query

2010-06-24 Thread Jakir71
I will need the largest id of table infantregistration.I used raw() method such as InfantRegistration.objects.raw('SELECT Max(id) FROM infantregistration'). It returns the error :'Manager' object has no attribute 'raw'. what can i do now??? -- You received this message because you are subscri

Re: About raw sql query

2010-06-24 Thread Tom Evans
On Thu, Jun 24, 2010 at 3:02 PM, Jakir71 wrote: > I will need  the largest id of  table infantregistration.I used raw() > method such as InfantRegistration.objects.raw('SELECT Max(id) FROM > infantregistration'). > > It returns the error :'Manager' object has no attribute 'raw'. > > what can i do

Re: About raw sql query

2010-06-24 Thread Tran Cao Thai
but it is only a simple query, why don't you use the query api (aggregate function...) On Fri, Jun 25, 2010 at 12:22 AM, Tom Evans wrote: > On Thu, Jun 24, 2010 at 3:02 PM, Jakir71 wrote: > > I will need the largest id of table infantregistration.I used raw() > > method such as InfantRegistrat

Re: About raw sql query

2010-06-24 Thread Daniel Roseman
On Jun 24, 3:02 pm, Jakir71 wrote: > I will need  the largest id of  table infantregistration.I used raw() > method such as InfantRegistration.objects.raw('SELECT Max(id) FROM > infantregistration'). > > It returns the error :'Manager' object has no attribute 'raw'. > > what can i do now??? .raw(

Re: problem deserialization

2010-06-24 Thread Daniel Roseman
On Jun 24, 2:47 pm, irum wrote: > Hi, > I am working on implementing a REST web service example of booking a > hotel. It was supposed to be simple to start with but I am already > badly stuck:) >  I am stuck  with deserialization and serialization.  I want to create > a new resource when PUT is re

Error :python manage.py runserver

2010-06-24 Thread Jagdeep Singh Malhi
./manage.py runserver Error: No module named messages OR python manage.py syncdb Error: No module named messages where is problem ??? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegrou

Manager's get_query_set are cached ?

2010-06-24 Thread Xavier Ordoquy
Hi, I'm banging my head against the wall with an issue in get_query_set. I'm using django 1.2.1 and I'd like to filter the queryset results through a date within get_query_set. However, I noticed that with the dev. server or gunicorn, the get_query_set is only called on the first request. This

Senior Django Developer - Remote Contract Work

2010-06-24 Thread sstartup
We are a New York stealth mode start-up looking for a senior Django Developer for some critical backend work for an upcoming consumer web app. Preferably, you have experience with database architecture, understand performance, and work diligently and sensitively around the needs of our app. The w

Re: noob syntax question

2010-06-24 Thread Sector7B
Thanks for the feedback and the link, all good stuff! I looked at what i had written, and I think a better way to ask the question is: What are the mechanics behind providing "choice_set.all()"? For example i have a field "choice" so having "_set" (concatenated) is that generated when i run syncdb

Re: noob syntax question

2010-06-24 Thread Daniel Roseman
On Jun 24, 7:01 pm, Sector7B wrote: > Thanks for the feedback and the link, all good stuff! > I looked at what i had written, and I think a better way to ask the > question is: > What are the mechanics behind providing "choice_set.all()"? > For example i have a field "choice" so having "_set" (con

Re: Content types and interaction with DeferredAttribute models

2010-06-24 Thread Andrew Ball
I have the same problem. It looks like the content types app will return the content type of the original model when asked for one since revision 10523 (see ticket #10738), but that an additional content type is still created. Is the creation of the additional content type necessary? http://code

Re: noob syntax question

2010-06-24 Thread Sector7B
very nice, thank you. I will look up the book. On Jun 24, 2:37 pm, Daniel Roseman wrote: > On Jun 24, 7:01 pm, Sector7B wrote: > > > Thanks for the feedback and the link, all good stuff! > > I looked at what i had written, and I think a better way to ask the > > question is: > > What are the me

Admin Media output order?

2010-06-24 Thread ringemup
Is there any way to change the order in which admin media are output (e.g. outputting a ModelAdmin-level javascript after a widget-level script)? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django

Re: Manager's get_query_set are cached ?

2010-06-24 Thread Daniel Roseman
On Jun 24, 6:36 pm, Xavier Ordoquy wrote: > Hi, > > I'm banging my head against the wall with an issue in get_query_set. > > I'm using django 1.2.1 and I'd like to filter the queryset results through a > date within get_query_set. > However, I noticed that with the dev. server or gunicorn, the ge

Re: Deploying Django with mod_wsgi

2010-06-24 Thread commonzenpython
it would give me the same error, but with a different directory, thanks a lot guys, i have solved this by putting SetEnv PYTHON_EGG_CACHE /tmp as follows SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE ash.settings SetEnv PYTHON_

How to do select from table where something in ('What','When','Where')

2010-06-24 Thread thusjanthan
Hi, Can someone provide the syntax for doing the following in django queries: Select * from tableA where columnA in ('Value1','Value2','Value3') Cheers, nathan. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: How to do select from table where something in ('What','When','Where')

2010-06-24 Thread Peter Herndon
tableA.objects.filter(columnA__in=['Value1', 'Value2', 'Value3']) http://docs.djangoproject.com/en/1.2/ref/models/querysets/#in On Jun 24, 2010, at 4:18 PM, thusjanthan wrote: > Hi, > > Can someone provide the syntax for doing the following in django > queries: > > Select * from tableA where c

Re: How to do select from table where something in ('What','When','Where')

2010-06-24 Thread Daniel Roseman
On Jun 24, 9:18 pm, thusjanthan wrote: > Hi, > > Can someone provide the syntax for doing the following in django > queries: > > Select * from tableA where columnA in ('Value1','Value2','Value3') > > Cheers, > nathan. in. http://docs.djangoproject.com/en/1.2/ref/models/querysets/#s-in -- DR. --

Re: How to do select from table where something in ('What','When','Where')

2010-06-24 Thread thusjanthan
Hi, How about not in? Select * from tableA where columnA not in ('Value1','Value2','Value3') On Jun 24, 1:23 pm, Peter Herndon wrote: > tableA.objects.filter(columnA__in=['Value1', 'Value2', 'Value3']) > > http://docs.djangoproject.com/en/1.2/ref/models/querysets/#in > > On Jun 24, 2010, at 4:

Re: How to do select from table where something in ('What','When','Where')

2010-06-24 Thread thusjanthan
nvm found it :) just append it to the .exclude method right? On Jun 24, 1:40 pm, thusjanthan wrote: > Hi, > > How about not in? > > Select * from tableA where columnA not in > ('Value1','Value2','Value3') > > On Jun 24, 1:23 pm, Peter Herndon wrote: > > > > > tableA.objects.filter(columnA__in=['

Re: How to do select from table where something in ('What','When','Where')

2010-06-24 Thread Peter Herndon
Yup. Sounds like you're getting the hang of it. On Jun 24, 2010, at 4:44 PM, thusjanthan wrote: > nvm found it :) just append it to the .exclude method right? > > On Jun 24, 1:40 pm, thusjanthan wrote: >> Hi, >> >> How about not in? >> >> Select * from tableA where columnA not in >> ('Value

pointer 1to1, '_ptr', what are the rules?

2010-06-24 Thread Skylar Saveland
I have: class Foo(models.Model): ... class Bar(Foo): class Meta: proxy=True class Baz(Foo): ... my baz instances have a `foo_ptr` attr on them and my bar instances do not. The only reason I can think of that this is is b/c Bar is a proxy. Is this correct? Is there some docu

null=False, blank=True and errors saving in admin?

2010-06-24 Thread ringemup
Upgrading from Django 1.0 to 1.2, I'm suddenly getting errors when creating objects in the admin form a class that essentially looks like this: class MyObject(models.Model): name = models.CharField(max_length=50) other_thing = models.ForeignKey(MyOtherModel, null=False, blank=True) def save

Serving django admin files using mod_python

2010-06-24 Thread commonzenpython
i have been playing with django using mod_python, so i activated the admin for my application and instead of the pretty looking page, i get : Django administration Welcome, ashtanga. Change password / Log out Site administration Auth Groups Add Change Users Add Change Sites Sites Ad

Re: Serving django admin files using mod_python

2010-06-24 Thread Skylar Saveland
mod_python is dead. you can just serve your static files .. statically. usually you might point at a cdn or put nginx in front although you could set /media or / ash/media to serve statically with apache. On Jun 24, 5:47 pm, commonzenpython wrote: > i have been playing with django using mod_pyt

Re: pointer 1to1, '_ptr', what are the rules?

2010-06-24 Thread Karen Tracey
On Thu, Jun 24, 2010 at 5:18 PM, Skylar Saveland wrote: > I have: > > class Foo(models.Model): > >... > > > class Bar(Foo): > > class Meta: >proxy=True > > > class Baz(Foo): > > ... > > my baz instances have a `foo_ptr` attr on them and my bar instances do > not. The only reason I can t

Re: null=False, blank=True and errors saving in admin?

2010-06-24 Thread Karen Tracey
On Thu, Jun 24, 2010 at 5:40 PM, ringemup wrote: > Upgrading from Django 1.0 to 1.2, I'm suddenly getting errors when > creating objects in the admin form a class that essentially looks like > this: > > class MyObject(models.Model): > name = models.CharField(max_length=50) > other_thing = model

Re: Serving django admin files using mod_python

2010-06-24 Thread commonzenpython
im new to mod_python, so could you please tell me how to set ash/media to serve statically with apache -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this g

Re: Manager's get_query_set are cached ?

2010-06-24 Thread Xavier Ordoquy
Thanks for your answer Daniel. I also though about mutable variable as default paramter but I doubt it is. Indeed, I should have pasted the code from the start, so here we go. Note that those are parts of the django-cms blog plugin called cmsplugin-blog (http://www.django-cms.org/en/extensions/?

Re: Serving django admin files using mod_python

2010-06-24 Thread Xavier Ordoquy
Le 25 juin 2010 à 00:23, commonzenpython a écrit : > im new to mod_python, so could you please tell me how to set ash/media > to serve statically with apache Hi, The documentation about Django seems pretty clear about static media to me. Have a look at http://docs.djangoproject.com/en/1.2/howt

Re: null=False, blank=True and errors saving in admin?

2010-06-24 Thread ringemup
Thanks, that didn't show up in my search, but it's exactly the same traceback. The ticket description seems to indicate the bug only applies to testing situations, but clearly it occurs in the default ModelForm (and thereby in the admin) any time a foreign key is set to null=False, blank=True. L

Re: Deploying Django with mod_wsgi

2010-06-24 Thread Graham Dumpleton
On Jun 25, 6:00 am, commonzenpython wrote: > it would give me the same error, but with a different directory, Which as I already mentioned on mod_wsgi list, and referred you to the documentation about, this is because Apache runs as special user and needs to be able to write to the parent direc

Re: null=False, blank=True and errors saving in admin?

2010-06-24 Thread Karen Tracey
On Thu, Jun 24, 2010 at 6:45 PM, ringemup wrote: > > Thanks, that didn't show up in my search, but it's exactly the same > traceback. > > The ticket description seems to indicate the bug only applies to > testing situations, but clearly it occurs in the default ModelForm > (and thereby in the adm

Re: Serving django admin files using mod_python

2010-06-24 Thread Graham Dumpleton
On Jun 25, 8:32 am, Xavier Ordoquy wrote: > Le 25 juin 2010 à 00:23, commonzenpython a écrit : > > > im new to mod_python, so could you please tell me how to set ash/media > > to serve statically with apache > > Hi, > > The documentation about Django seems pretty clear about static media to me.

Using PostgreSQL Blob from Django

2010-06-24 Thread Daniel Espinosa Ortiz
I have a PHP application using PostgreSQL backend. I'm storing files on the database. I have different tables with a file (OID), filename and mime to detect the row's associated file. I'm trying to port this application to django. How Can Use this blob with django? Exist some suggestions about it?

m2m with intermediary - model design? Disappears from Django-Admin?

2010-06-24 Thread Victor Hooi
heya, NB: This is a followup to this: http://groups.google.com/group/django-users/browse_thread/thread/0fdc1dfb1fddb97b/6b559dc4abf5d4ea but I thought I'd also ask about the model design. To provide some background, we have a Django app that contains a list of journal articles. Each "Article"

Re: m2m with intermediary - model design? Disappears from Django-Admin?

2010-06-24 Thread Victor Hooi
heya, Also, I should add I did try using the inlines as described in the docs http://docs.djangoproject.com/en/dev/ref/contrib/admin/#working-with-many-to-many-intermediary-models In my admin.py, I've imported "FirmRating" at the top. I've then created an inline for it: class FirmRatingInline(

Re: m2m with intermediary - model design? Disappears from Django-Admin?

2010-06-24 Thread Victor Hooi
heya, Ok, scratch all that, I'm an idiot. A simple restart of my Apache process, and the m2m intermediary inline works *grins*. Thanks anyhow to the awesome Django community for an awesome tool =). I do have a final question though. I can now edit "Firms" as inlines from the "Article" page, whi

Re: m2m with intermediary - model design? Disappears from Django-Admin?

2010-06-24 Thread iliveinapark
Gday Victor, Glad you found the inline admin method for attaching your m2m's with throughs. It isn't possible to to use the filter_horizontal widget for through m2m, because, as you noted, there's no space for the extra fields to be input. You could always try to extend the widget, but this is mor

process_response not getting called in custom middleware.

2010-06-24 Thread iliveinapark
Gday folks, I've written a middleware to add some session variables based on the request variable; this is done in process_request, which always returns None. I'd like to set some cookies as well, based on the same session variables, which should be done in process_response. I wrote the method, bu

Re: Admin Media output order?

2010-06-24 Thread iliveinapark
Gday, Overriding the admin templates is the only way to do this: http://docs.djangoproject.com/en/1.2/ref/contrib/admin/#overriding-admin-templates You can either try listing the items how you want (this will mean a change to the templates everytime you register something new), or doing it using

Re: Deployment hesitation after James Bennett's post, WSGI or ...?

2010-06-24 Thread lzantal
Hi, I just did my first django deploy with nginx+fcgi with ssl and I have to say it was much easier to set it up and configure it than nginx +apache2+wsgi It also uses way less ram and CPU then the other deploy. Also I am using supervisord to manage the django fcgi. So far very happy with i

Re: Using PostgreSQL Blob from Django

2010-06-24 Thread Kenneth Gonsalves
On Friday 25 June 2010 05:19:36 Daniel Espinosa Ortiz wrote: > I have a PHP application using PostgreSQL backend. I'm storing files > on the database. I have different tables with a file (OID), filename > and mime to detect the row's associated file. I'm trying to port this > application to django.

Re: m2m with intermediary - model design? Disappears from Django-Admin?

2010-06-24 Thread Victor Hooi
heya, Brenton: Thanks for the reply =). Hmm, I was hoping to use the filter_horizontal widget to set the relationship, and just have a box below that for setting the rating. But you're right, we'd need a table for each rating for each relationship, and there's a room issue. I might look into ext

reloading in shell

2010-06-24 Thread Kenneth Gonsalves
hi, when I run python manage.py shell, I find each time there is a change in code or an error I have to exit the shell and re enter it. Which means I lose the history - is there an easier way to do this? -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -- You received this me

Re: reloading in shell

2010-06-24 Thread Shawn Milochik
Install ipython. It has a lot of great features, including retaining history. If it's installed, Django will use it by default if you run manage.py shell. Shawn Sent from my iPhone 4, for which I waited in line for six hours like a fool on release day. -- You received this message becaus

Re: m2m with intermediary - model design? Disappears from Django-Admin?

2010-06-24 Thread iliveinapark
Gday again Victor, If you think about it, the filter_horizontal widget really doesn't make sense in this context, because selecting multiple objects to link to will still require a list of them somewhere (as you mention) to set the rating. Since you like the searchability, perhaps adding an autoco

Re: Serving django admin files using mod_python

2010-06-24 Thread commonzenpython
im done using mod_python , i have switched to mod_wsgi completely, thanks guys for all your help -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group,

Re: reloading in shell

2010-06-24 Thread Kenneth Gonsalves
On Friday 25 June 2010 08:43:08 Shawn Milochik wrote: > Install ipython. > > It has a lot of great features, including retaining history. > > If it's installed, Django will use it by default if you run manage.py > shell. thanks - that with django-extensions has just made my life much easier.

ModelChoiceField

2010-06-24 Thread Tran Cao Thai
Hi all, is there any way to use the ModelChoiceField without any value in it? I tried to set query = None but it gave an error while rendering the html page -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Rendering the Admin app list?

2010-06-24 Thread derek
Working with Django 1.2.1 The default index page for Django admin contains: {% if app_list %} {% for app in app_list %} ... {% endfor %} {% else %} {% trans "You don't have permission to edit anything." %} {% endif %} I'd like to move this snippet to a separate page; however, when I

Re: ModelChoiceField

2010-06-24 Thread Oleg Lomaka
On 6/25/10 8:25 AM, Tran Cao Thai wrote: is there any way to use the ModelChoiceField without any value in it? I tried to set query = None but it gave an error while rendering the html page Use EmptyQuerySet. field = ModelChoiceField(queryset=YouMode.objects.none()) http://docs.djangoproject