Re: initial data

2005-09-24 Thread Matt
to clarify for those as slow as I am... the "models' Python model names" refers to the plural names of your modul class names. rewriting the example to (hopefully) make this more clear: class Poll(meta.Model): ... class Choice(meta.Model): ... will look for the following files: apps/

Re: Non-model driven ordering

2005-09-24 Thread Matt
Thanks for the hint. Here's what worked for me: class Toppings: ... class META: admin = meta.Admin(ordering=('_order',)) order_with_respect_to = 'pizza' and now the orderings seem to work. ... but (and there's always a but, huh?) now on an individual topping edit page

Insert error

2005-09-24 Thread asrenzo
Hi, Here's my model : class Image(meta.Model): paragraph = meta.ForeignKey(Paragraph) creation_date = meta.DateTimeField(null=False, auto_now_add=True) update_date = meta.DateTimeField(null=False, auto_now=True) name = meta.CharField(maxlength = 255, blank = True) img =

Re: Problem/questions about generic views

2005-09-24 Thread Jason Davies
PythonistL wrote: > urlpatterns = patterns('', > (r'^list/(?P\d+)/$', > 'django.views.generic.list_detail.object_list',info_dict), > ) > > > is it possible to use ,for example, > /list/3/ > > to move to page 3 This doesn't work because object_list doesn't take a

Relating a model to another model more than once - with ManyToMany

2005-09-24 Thread Andreas
I'm trying to relate a model to another model via ManyToMany, twice: class Person(meta.Model): ... class Task(meta.Model): ... edit_users = meta.ManyToManyField(Person, related_name="may_edit_task") view_users = meta.ManyToManyField(Person, related_name="may_view_task") Task

Problem/questions about generic views

2005-09-24 Thread PythonistL
I use the generic view django.views.generic.list_detail.object_list In my main.py url I have ##main.py### info_dict = {'template_name':'shop/MyOwnTemplate', 'app_label': 'shop', 'module_name': 'registrations', 'paginate_by':10,

Re: Non-model driven ordering

2005-09-24 Thread Andreas
> Also trying to go to the toppings list page in the admin I get the > following error: > [..] > FieldDoesNotExist: name=_order I had this problem too. Adrian suggested, as a workaround, adding something like ordering='name' in the meta.admin()-call. See