it is to no avail

think that's only for modifying the admin.

Best Regards,

Stanwin Siow



On Feb 15, 2012, at 2:41 PM, Mike Dewhirst wrote:

> On 15/02/2012 5:10pm, Stanwin Siow wrote:
>> Yes i have gone through the tutorial.
>> 
>> And i've gotten my website up and running.
>> 
>> But when i want to enable admin it gives me that error.
> 
> Try creating a file called admin.py in the same directory as models.py and 
> put this in it ...
> 
> - - - - - - -
> from polls.models import Poll
> from django.contrib import admin
> 
> admin.site.register(Poll)
> - - - - - - -
> 
> https://docs.djangoproject.com/en/dev/intro/tutorial02/#make-the-poll-app-modifiable-in-the-admin
> 
> 
> 
>> 
>> Here is my urls.py:
>> 
>> from django.conf.urls.defaults import patterns, include, url
>> 
>> # Uncomment the next two lines to enable the admin:
>> from django.contrib import admin
>> admin.autodiscover()
>> 
>> urlpatterns = patterns('',
>> # Examples:
>> # url(r'^$', 'r2.views.home', name='home'),
>> # url(r'^r2/', include('r2.foo.urls')),
>> # Uncomment the admin/doc line below to enable admin documentation:
>> url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
>> 
>> # Uncomment the next line to enable the admin:
>> (r'^admin/', include('django.contrib.admin.urls')),
>> ....
>> 
>> 
>> and INSTALLED APPS settings:
>> 
>> INSTALLED_APPS = (
>> 'django.contrib.auth',
>> 'django.contrib.contenttypes',
>> 'django.contrib.sessions',
>> 'django.contrib.sites',
>> 'django.contrib.messages',
>> 'django.contrib.staticfiles',
>> *# Uncomment the next line to enable the admin:*
>> *'django.contrib.admin',*
>> *# Uncomment the next line to enable admin documentation:*
>> *'django.contrib.admindocs',*
>> 'registration',
>> 'r2.topic',
>> 'r2.opinion',
>> 'r2',
>> 'r2.statistics',
>> 'paypal.standard.ipn',
>> )
>> 
>> besides the tutorial basically just says to uncomment the lines and we
>> should access the page through localserver/admin
>> 
>> Thanks for looking into this
>> 
>> 
>> 
>> 
>> 
>> 
>> Best Regards,
>> 
>> Stanwin Siow
>> 
>> 
>> 
>> On Feb 15, 2012, at 2:08 PM, Mike Dewhirst wrote:
>> 
>>> On 15/02/2012 4:59pm, Stanwin Siow wrote:
>>>> it's supposed to be django's admin page.
>>> 
>>> Not quite. Can you give me an overview of what you have done with
>>> Django so far? For example, have you gone through the tutorial?
>>> 
>>>> 
>>>> I don't have an admin.py in my project folders
>>>> 
>>>> 
>>>> Best Regards,
>>>> 
>>>> Stanwin Siow
>>>> 
>>>> 
>>>> 
>>>> On Feb 15, 2012, at 1:46 PM, Mike Dewhirst wrote:
>>>> 
>>>>> On 15/02/2012 4:39pm, Stanwin Siow wrote:
>>>>>> Hi there,
>>>>>> 
>>>>>> i'm getting this error when trying to get the default admin page up.
>>>>>> 
>>>>>> invalid syntax (admin.py, line 1)
>>>>> 
>>>>> Could you post the contents of the offending file (admin.py) here?
>>>>> 
>>>>>> 
>>>>>> 
>>>>>> Any ideas where to rectify this?
>>>>>> 
>>>>>> Thanks in advance
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> Best Regards,
>>>>>> 
>>>>>> Stanwin Siow
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> 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
>>>>>> <mailto:django-users@googlegroups.com>
>>>>>> <mailto:django-users@googlegroups.com>.
>>>>>> To unsubscribe from this group, send email to
>>>>>> django-users+unsubscr...@googlegroups.com
>>>>>> <mailto:django-users+unsubscr...@googlegroups.com>
>>>>>> <mailto: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
>>>>> <mailto:django-users@googlegroups.com>
>>>>> <mailto:django-users@googlegroups.com>.
>>>>> To unsubscribe from this group, send email to
>>>>> django-users+unsubscr...@googlegroups.com
>>>>> <mailto:django-users+unsubscr...@googlegroups.com>
>>>>> <mailto: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
>>>> <mailto:django-users@googlegroups.com>.
>>>> To unsubscribe from this group, send email to
>>>> django-users+unsubscr...@googlegroups.com
>>>> <mailto: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
>>> <mailto:django-users@googlegroups.com>.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com
>>> <mailto: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.
> 
> -- 
> 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.

Reply via email to