Best practice - evolving from one to several sites using Django

45 views
Skip to first unread message

Ari Davidow

unread,
Apr 30, 2014, 9:07:53 AM4/30/14
to django...@googlegroups.com
Hi,

I am new to this group and new to Django. I have several websites that I want to drag into the current century. Initially I planned to do this with Drupal and know that it is relatively simple to add configuration information, modules, themes, for new sites using one Drupal installation.

What would be best practice for doing this in Django, knowing that I need to start off with the simplest site and then add additional domains as I have time and get more facile? My goal is to keep theming, most tables, etc., separate, but to have one django codebase to patch and to keep current.

Some areas of overlap: possible blog entries, a calendar of events, different views into a database of people involved in overlapping communities.

I see the terms "multisite" and "multi-tenant" used, but am not sure what each of these means in the context of django.

Many thanks,
Ari

Avraham Serour

unread,
Apr 30, 2014, 10:26:12 AM4/30/14
to django...@googlegroups.com
if I'm not mistaken having a multi tentant django deploy means they will share the same DB
I suggest having separate deployments for each site, as for sharing code you should create an app which is the shared code and put in version control and all your deployments would update from the same repository
the code could be the same but most of the time there should be many different files, settings.py, templates, static files etc so putting all the common code in a separate app would make sense at least to me

good luck


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/370c1a46-030d-44cb-a65d-62b1beb86b15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ilya Kazakevich

unread,
Apr 30, 2014, 10:36:46 AM4/30/14
to django...@googlegroups.com
Hello Ari,

First of all Drupal is PHP CMS, while Django is Python web-framework (and should be compared to PHP Zend or PHP Symfony then).

Django supports multiple sites: https://docs.djangoproject.com/en/1.7/ref/contrib/sites/

But Django uses one database and each table would have some kind of "site_id" field. It works pretty well.
And you can use different themes and different urls for each site.

Many apps already exist for Django, check here: http://djangopackages.com
You can take blogs app or calendar app and only customize it (writing your own HTML templates)

Install Django and try to move one site to it. Then, move next one.

Ilya Kazakevich,
JetBrains PyCharm (Best Python/Django IDE)
http://www.jetbrains.com/pycharm/
"Develop with pleasure!"
>--
>You received this message because you are subscribed to the Google Groups
>"Django users" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to
>django-users...@googlegroups.com.
>To post to this group, send email to django...@googlegroups.com.
>Visit this group at http://groups.google.com/group/django-users.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/django-users/370c1a46-030d-44cb-a65d-62
>b1beb86b15%40googlegroups.com
><https://groups.google.com/d/msgid/django-users/370c1a46-030d-44cb-a65d-6
>2b1beb86b15%40googlegroups.com?utm_medium=email&utm_source=footer>
>.
Reply all
Reply to author
Forward
0 new messages