Friday, December 28, 2012

Re: Admin page not found error

Hi,

Still It is not working. I have run 'python manage.py syncdb'. I have checked settings.py, I have comment out the INSTALLED_APPS and SITE_ID = 1 is already been set. But, I could not solve the problem.

For convenience, I have attached my project folder. Could you please check, what I have done wrong??

Thanks, in advance.

On Friday, December 28, 2012 7:37:31 PM UTC+1, Ryan Blunden wrote:
It appears that the problem is to do with the Sites app.

Have you ran `python manage.py syncdb`? If the sites app is in the INSTALLED_APPS tuple, this takes care of creating a site for you that has an id of 1 which is what will match the default SITE_ID value in your settings.py

Things to try:

1) Comment out the sites app in INSTALLED_APPS

or

2) Ensure you have SITE_ID = 1in your settings and create a Site model entry with an id of 1. 

Cheers,
Ryan

On 28/12/2012, at 12:29 AM, Shahjalal Hossain <shahjal...@gmail.com> wrote:


Hi, I am new at Django. I am learning Django from instruction manual "a basic poll application". I was doing step by step. But, at a certain point I stacked.

It does not shows admin page as "2.4 Writing your first Django app, part 2". I have done all the steps, like uncomment settings.py and urls.py and run the syncdb. I am writing on code on Aptana Studio 3. For convenient, I have given some images. and source files.

Thanks, in advance.

settings.py

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',
    'polls',
)

urls.py

from django.conf.urls 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'^$', 'mysite.views.home', name='home'),
    # url(r'^mysite/', include('mysite.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:
    url(r'^admin/', include(admin.site.urls)),
)




--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/A_uLa0LzjUYJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@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 view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/V3cEpnwQDdIJ.
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