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/
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
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 =
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
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
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,
> 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
7 matches
Mail list logo