Closed GoogleCodeExporter closed 9 years ago
Try to update to the last revision. This problem should be fixed.
Original comment by batiste....@gmail.com
on 19 Nov 2008 at 9:43
Original comment by batiste....@gmail.com
on 19 Nov 2008 at 3:40
What does latest revision mean?? I got the code from svn trunk, isn't that the
latest?
Original comment by sumit.ch...@gmail.com
on 19 Nov 2008 at 6:02
You require mptt.register() you commented out in step 3.
That's a function of django-mptt that is used by page-cms. See
http://code.google.com/p/django-mptt/ for
more information.
Original comment by leidel
on 19 Nov 2008 at 7:57
Well if I leave the register there then I am getting "The model Page has
already been
registered" error. Not sure why thats happening.
Is this code supposed to work with Django 1.0+ ??
Detailed error:
Environment:
Request Method: GET
Request URL: http://localhost:8000/
Django Version: 1.0.2 final
Python Version: 2.5.1
Installed Applications:
['django.contrib.auth',
'django.contrib.humanize',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'registration',
'tivix_com',
'accounts',
'apps.box_net',
'apps.paypal',
'apps.paypal',
'apps.crm',
'lib.rc_cms.pages']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.transaction.TransactionMiddleware',
'accounts.middleware.AssociatedAccountMiddleWare',
'django.middleware.locale.LocaleMiddleware')
Traceback:
File "/Library/Python/2.5/site-packages/django/core/handlers/base.py" in
get_response
77. request.path_info)
File "/Library/Python/2.5/site-packages/django/core/urlresolvers.py" in resolve
179. for pattern in self.urlconf_module.urlpatterns:
File "/Library/Python/2.5/site-packages/django/core/urlresolvers.py" in
_get_urlconf_module
198. self._urlconf_module = __import__(self.urlconf_name, {}, {}, [''])
File "/Users/chachra/Dropbox/tivix/code/dev/tivix/urls.py" in <module>
8. admin.autodiscover()
File "/Library/Python/2.5/site-packages/django/contrib/admin/__init__.py" in
autodiscover
40. __import__("%s.admin" % app)
File
"/Users/chachra/Dropbox/tivix/code/dev/tivix/lib/rc_cms/pages/admin/__init__.py"
in <module>
14. from pages.models import Page, Content, tagging
File "/Users/chachra/Dropbox/tivix/code/dev/tivix/lib/rc_cms/pages/models.py"
in <module>
164. mptt.register(Page)
File "/Users/chachra/Dropbox/tivix/code/dev/tivix/lib/rc_cms/mptt/__init__.py"
in
register
34. _('The model %s has already been registered.') % model.__name__)
Exception Type: AlreadyRegistered at /
Exception Value: The model Page has already been registered.
Original comment by sumit.ch...@gmail.com
on 19 Nov 2008 at 8:01
FYI, standalone it seems to run just fine!! I would rather have everything run
within
my old code-base, although running 2 django apps on same db may be a
possibility.
What in my current app is causing this, any idea? admin.autodiscover() called
from
many points in the code ? How can I fix this by making minimal changes to the
source,
and/or if i can contribute a patch to fix this since others seem to be facing
similar
issues.
Original comment by sumit.ch...@gmail.com
on 19 Nov 2008 at 8:34
Original comment by batiste....@gmail.com
on 19 Nov 2008 at 9:47
"What in my current app is causing this, any idea?"
It's hard to tell without knowing your code.
Original comment by batiste....@gmail.com
on 20 Nov 2008 at 10:39
Yes, page-cms works on Django 1.0+
As Batiste said, it's hard to tell without knowing the structure of your Django
project. I added a simple exception
handling in r221 to handle that situation. It's most likely caused by different
import paths, e.g. having pages in a
project namespace 'myproject.pages' while pages uses the plain 'pages'
namespace.
Original comment by leidel
on 23 Nov 2008 at 11:18
@sumit.chachra: Does it work for you now?
Original comment by leidel
on 27 Nov 2008 at 11:39
Haven't had time to re-try. Will do and post here!
Original comment by sumit.ch...@gmail.com
on 27 Nov 2008 at 1:25
Without anymore news from sumit.chachra, I decide to close this bug for now.
Original comment by batiste....@gmail.com
on 20 Feb 2009 at 8:09
Original issue reported on code.google.com by
sumit.ch...@gmail.com
on 19 Nov 2008 at 2:53