views:

128

answers:

1

I have installed Django on my host (I use their install version 1.1.1), all is working fine. I have created some apps and they are registered in my settings.py (I can verify this works when i visit the site, the app shows up). In the folder of this app i have created admin.py with the following content:

from progmaticnet.page.models import Page, PageContent
from django.contrib import admin

class PageContentInline( admin.StackedInline ):
  model = PageContent
  extra = 1
  max_num = 1

class PageAdmin( admin.ModelAdmin ):
  inlines = [ PageContentInline ]

  class Media:
   #js = ('/site_media/js/tinymce/jscripts/tiny_mce/tiny_mce.js', '/site_media/js/tinymce/textarea.js')


admin.site.register( Page, PageAdmin )

But my app doesn't show up in the admin... It is said in the documentation that you'll need to restart the server, although i can't do that (runs on apache), i have a dispatch.fcgi with this content:

#!/usr/bin/python
import sys, os

project_sys="/home/progmati/public_html"

#add a custom python path
sys.path.insert(0, project_sys)

# set the DJANGO_SETTINGS_MODULE environment variable
os.environ['DJANGO_SETTINGS_MODULE'] = 'progmaticnet.settings'

from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded")

I have killed the process and started it anew but with no avail... Does anybody know what to do about it?

Thanks

+3  A: 

Why is the js declaration commented out in your Media class? That looks like it'll be an invalid class definition as a result (class definitions can't be entirely empty). Try uncommenting it, or adding pass below the commented out line, like this:

class Media:
  #js = ('/site_media/js/tinymce/jscripts/tiny_mce/tiny_mce.js', '/site_media/js/tinymce/textarea.js')
  pass
Dominic Rodger
Oh, yes. `pass`is an evergreen.
Boldewyn
Owh thanks, how could i have been looking over that :PThank you very much!
Bloeper