Thursday, January 3, 2013

Re: Admin page not found error

Hi,

I have ran into this a few times and it's not exactly obvious what's going on. In short, the last line of the exception:

return getpass.getuser().decode(locale.getdefaultlocale()[1])

is somewhat of a hint, if you can even call it that. 

Try setting $LANG in your shell environment. For example, if you're using bash/zsh:

export LANG=en_US.UTF-8

For other shells, you may have to use setenv.

That's obviously for US english. You'll have to replace "en_US.UTF-8" with your locale string. For more information on that check out:

http://cygwin.com/cygwin-ug-net/setup-locale.html
http://userguide.icu-project.org/locale

or you could even check out the man page:

man locale

Hope this helps.

-Evan



On Friday, December 28, 2012 12:29:50 AM UTC-8, Shahjalal Hossain 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/-/hEYZPvLCFLMJ.
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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate