File tree 4 files changed +12
-1
lines changed
4 files changed +12
-1
lines changed Original file line number Diff line number Diff line change
1
+ default_app_config = 'cog.apps.CogConfig'
Original file line number Diff line number Diff line change
1
+ from django .apps import AppConfig
2
+
3
+ class CogConfig (AppConfig ):
4
+
5
+ name = 'cog'
6
+ verbose_name = "CoG Scientific Projects Web Environment"
Original file line number Diff line number Diff line change 22
22
from cog .plugins .esgf .security import esgfDatabaseManager
23
23
from django_openid_auth .models import UserOpenID
24
24
25
+ from django import setup as django_setup
25
26
from django .core import management
26
27
import sqlalchemy
27
28
import datetime
@@ -36,6 +37,9 @@ class CoGInstall(object):
36
37
37
38
def __init__ (self ):
38
39
40
+ # in stand-alone scripts, must explicitly invoke django.setup() to populate the application registry before anything can be done
41
+ django_setup ()
42
+
39
43
# read cog_settings.cfg
40
44
self .siteManager = SiteManager ()
41
45
Original file line number Diff line number Diff line change 196
196
'django_openid_auth' ,
197
197
'grappelli' ,
198
198
'filebrowser' ,
199
- 'django.contrib.admin' ,
199
+ 'django.contrib.admin.apps.SimpleAdminConfig ' ,
200
200
'django_comments' ,
201
201
'django.contrib.webdesign' ,
202
202
'django.contrib.staticfiles' ,
You can’t perform that action at this time.
0 commit comments