Monday, January 30, 2012

Re: Tutorial for dev version not working (Polls app): admin

On Sun, Jan 29, 2012 at 12:15 AM, Alec Taylor <alec.taylor6@gmail.com> wrote:
>
> Going through the tutorial using the latest trunk in a virtualenv.
>
> I am getting stuck in this section:
> https://docs.djangoproject.com/en/dev/intro/tutorial02/#s-customize-the-admin-form
>
> No matter how I rearrange the fields (even when I remove the
> "question" field), I cannot notice any difference in the poll admin
> screens. I have tried syncdb, and restarting the server.

I've just followed tutorial up to that and it's working for me.
>
> I've looked at [...] the view screen
> (http://localhost:9400/admin/polls/poll/1/) and the add screen
> (http://localhost:9400/admin/polls/poll/add/). There are no
> differences in field order/display on any of these pages.

The two pages above are the ones that are supposed to reflect
the changes in vusual order) you perform to the 'fields' field of your
django.contrib.admin.ModelAdmin subclass named PollAdmin.

In that step of the tutorial one is supposed to work with the
polls/admin.py and edit it so the final contents are::

01 from polls.models import Poll
02 from django.contrib import admin
03
04 class PollAdmin(admin.ModelAdmin):
05 fields = ['pub_date', 'question'] # or the order you want to use
06
07 admin.site.register(Poll, PollAdmin)


Are you sure you are doing that?

--
Ramiro Morales

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment