Needed to import pendulum.admin to get admin site to show up

0 views
Skip to first unread message

Nicholas Riley

unread,
Nov 18, 2008, 1:21:23 AM11/18/08
to pendulum-users
Hi,

I followed the instructions in the README but I could not get the
"Pendulum configurations" section to show up in the admin. If I try to
go to Pendulum I get "Please configure Pendulum for example.com!" so
it seems that part is working OK. I was able to get the admin to work
by adding "import pendulum.admin" to urls.py, however, so perhaps this
should be mentioned in the README.

Josh

unread,
Nov 18, 2008, 1:26:21 AM11/18/08
to pendulum-users
That is quite a strange problem you've encountered. Would you mind
sharing what version of Django and which OS you're using? Or, perhaps
before we get into any of that, do you have the following lines in
your main urls.py file?

from django.contrib import admin
admin.autodiscover()

Nicholas Riley

unread,
Nov 18, 2008, 1:38:27 AM11/18/08
to pendulum-users
One more thing... pendulum_base.html extends base.html but I don't see
any base.html (or CSS, if it's in a separate file). Is it possible
you forgot to check it/them in?

Nicholas Riley

unread,
Nov 18, 2008, 1:40:31 AM11/18/08
to pendulum-users
On Nov 18, 12:26 am, Josh <wheaties....@gmail.com> wrote:
> That is quite a strange problem you've encountered.  Would you mind
> sharing what version of Django and which OS you're using?  Or, perhaps
> before we get into any of that, do you have the following lines in
> your main urls.py file?
>
> from django.contrib import admin
> admin.autodiscover()

Django 1.0.1, Python 2.5.1, Linux, pretty standard. Here is my entire
urls.py:

from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
import pendulum.admin

from django.conf.urls.defaults import *

urlpatterns = patterns('',
(r'^admin/(.*)', admin.site.root),
(r'^pendulum/', include('pendulum.urls')),
)

It's not a big deal, it does work :-)

--Nicholas

Josh

unread,
Nov 18, 2008, 1:46:45 AM11/18/08
to pendulum-users
I didn't include it because I figured most people wouldn't need it,
but I will check it in for giggles.

Nicholas Riley

unread,
Nov 18, 2008, 1:50:16 AM11/18/08
to pendulum-users
On Nov 18, 12:46 am, Josh <wheaties....@gmail.com> wrote:
> I didn't include it because I figured most people wouldn't need it,
> but I will check it in for giggles.

Yeah I guess maybe I'm an atypical user, I saw your announcement and
thought "hey, I need a time-tracker" for work having nothing to do
with Django, however being written in Django will make it easier for
me to hack on it... :-)

Anyway, thanks, things look good so far.

Josh

unread,
Nov 18, 2008, 1:53:53 AM11/18/08
to pendulum-users
Thanks Nicholas! I appreciate your comments and suggestions.

I've just committed the base.html. I also threw you a bone and
included some simple templates for the django-registration application
that Pendulum can use. You can find them in the pendulum/templates/
directory, but I make no guarantees that they will work 100% ;)

Keep the comments and suggestions coming!

Josh

unread,
Nov 18, 2008, 1:55:24 AM11/18/08
to pendulum-users
Tha'ts pretty strange that your site didn't pick up the Pendulum
models. Perhaps it has something to do with the duplicate from
django.conf.urls.defaults import * line?
Reply all
Reply to author
Forward
0 new messages