Re: Tutorial for dev version not working (Polls app): admin
On Sun, Jan 29, 2012 at 12:15 AM, Alec Taylorwrote: > > 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Tutorial for dev version not working (Polls app): admin
syncdb will not remake tables that are already made. For that you will have to pipe the output of: $ python manage.py resetsql through your database backend. Then try restarting the server and looking at your admin. On Sat, Jan 28, 2012 at 10:15 PM, Alec Taylorwrote: > 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 looked at the index screen > (http://localhost:9400/admin/polls/poll/), 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. > > I have followed the tutorial exactly, but the fields aren't being > rearranged. > > Is there a different way of rearranging admin fields in Django 1.4? > > Thanks for helping me get this working, > > Alec Taylor > > -- > 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+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Tutorial for dev version not working (Polls app): admin
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 looked at the index screen (http://localhost:9400/admin/polls/poll/), 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. I have followed the tutorial exactly, but the fields aren't being rearranged. Is there a different way of rearranging admin fields in Django 1.4? Thanks for helping me get this working, Alec Taylor -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.