On Fri, Aug 14, 2009 at 11:22 PM, Léon Dignòn<[email protected]> wrote: > > As it sais it's an indentation error. Instead you must write: >> inlines = [ChoiceInline] >> list_display = ('question','pub_date') #line 16 >> >> admin.site.register(Poll, PollAdmin) >
Thankyou. hmm.. It is strange.! ( indentation error)! But, after restarting the server, my Polls APP is not in admin area loaded. It always when I have an error message. many thanks in advance, regards, koko > > On Aug 14, 10:53 pm, koko <[email protected]> wrote: >> Dear All, >> >> I just start Django today and very enjoy with Django. I have some >> trouble with Django Official Docs Tutorial 2 >> fromhttp://docs.djangoproject.com/en/dev/intro/tutorial02/ >> >> here is the error message. Can you help, what I do wrong here? >> >> IndentationError at /admin/ >> unexpected indent (admin.py, line 16) >> Request Method: GET >> Request URL: http://localhost:8000/admin/ >> Exception Type: IndentationError >> Exception Value: >> unexpected indent (admin.py, line 16) >> Exception Location: /Library/Python/2.5/site-packages/django/utils/ >> importlib.py in import_module, line 35 >> Python Executable: /System/Library/Frameworks/Python.framework/ >> Versions/2.5/Resources/Python.app/Contents/MacOS/Python >> Python Version: 2.5.1 >> >> Django version 1.2 pre-alpha. >> >> polls/admin.py >> >> from mysite.polls.models import Poll >> from mysite.polls.models import Choice >> from django.contrib import admin >> >> class ChoiceInline(admin.TabularInline): >> model = Choice >> extra = 3 >> >> class PollAdmin(admin.ModelAdmin): >> fieldsets = [ >> (None, {'fields': ['question']}), >> ('Date information', {'fields': ['pub_date'], 'classes': >> ['collapse']}), >> ] >> inlines = [ChoiceInline] >> list_display = ('question','pub_date') #line 16 >> >> admin.site.register(Poll, PollAdmin) >> >> best regards, >> >> koko > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

