On 23/08/10 16:20, nostradamnit wrote:
Is it possible to integrate Satchmo is such a way as to keep the
existing site's admin and satchmo's separate? I can't seem to figure
out how to run it as it's own project with an independent settings.py
as a subfolder of the existing site.
At a guess, yes. Probably the path of least resistance would be to allow
Satchmo use the default AdminSite instance, as it does an
admin.autodiscover().
Then, modify your existing site so that you create a new AdminSite
instance (rather than the one at django.contrib.admin.sites.site that
gets populated by admin.autodiscover) and register your existing app's
ModelAdmin instances with that. Finally, register that under a different
URL space. Off the top of my head (and untested), something like:
# myapp/admin.py
from django.contrib.admin.sites import AdminSite
custom_admin_site = AdminSite()
custom_admin_site.register(MyModel, MyModelAdmin)
# root urls.py
from django.contrib import admin
# Satchmo registered with the usual admin site
admin.autodiscover()
from myapp.admin import custom_admin_site
urlpatterns = patterns('',
(r'^satchmo-admin/', include(admin.site.urls)),
(r'^myapp-admin/', include(custom_admin_site.urls))
)
###
You should then find Satchmo's admin site at /satchmo-admin, and your
own app's admin site at /myapp-admin.
This is all written off the top of my head, so you'll probably need to
make a couple of tweaks - but the principle should be sound.
Cheers,
Dan
--
Dan Fairs | [email protected] | www.fezconsulting.com
--
You received this message because you are subscribed to the Google Groups "Satchmo
users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/satchmo-users?hl=en.