Refer tutorials to make multitenant application with shared database with multiple schma

40 views
Skip to first unread message

Devender Kumar

unread,
Sep 19, 2018, 3:09:20 AM9/19/18
to Django users
Hi,
I need a help from you I wanna start a project which is a multitenant application and I want the tenant can register themselves and schema is created for him from the shared database across tenants.
I want to make this application in Django I know all the terminology of how multitenancy can be achieved I just want to how to write the code for this as I have never played with schemas and other stuff.
You refer to any project where I can get an insight, Any tutorial link for this project. 
Thanks 
Dev

Devender Kumar

unread,
Sep 19, 2018, 3:11:32 AM9/19/18
to Django users
All this should be done using the MySQL database.

Joel

unread,
Sep 19, 2018, 3:21:54 AM9/19/18
to django...@googlegroups.com
Follow the django tutorial. Once you complete part 2, you can easily start writing.


You don't have to worry too much about schema as you use models. 


--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9e3918ae-7e2c-4ee9-9f20-eceb55983c79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michal Petrucha

unread,
Sep 19, 2018, 7:52:10 AM9/19/18
to django...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I don't have any tutorials at hand, I only know that the de-facto
standard implementation of schema-based multitenancy is
https://github.com/tomturner/django-tenants, but AFAIK, that only
supports Postgres. Not sure if there's anything like that for mysql.

Good luck,

Michal
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJbojg9AAoJEHA7T/IPM/kljwwP/0kKZ3CwgUl9OxNB2THxcQEJ
ioDPkLIiF6HLRHhnBo29wZJX+2ngrh1lMagUZLJ7FpnPCl6IUyf1hmE4WyRU17fn
93ypqt2HLgz5HFKtvcRO5tGIQUf7BGa/J6NZHTgZy6QhYVqILgdUrjLQYcCq6Vj3
POHfVOjQv2VznnQ58ZPBkn9RHBRkVjcYHEJ5Pqm88PkJOvDF+0CefQaSeWwQemxX
p59WJKWFyLg/Fn/MJ2r8tZsc8Le/HtzUzh18ACUUT6cxsbrg3EW69/KMNaATvNjW
Ls6lALBEACTZR+qyC1H78fT/EaOGIei3PaxjDKJh1S4D2dDJUpWTvN+YCBXiXhk5
bTy1u/OJabkdhW9bDTV2hTF4zwQtiywqfjcesuBPhDWPUhOXiwQ0DV5E4CtLo3Nq
ZUNNBQCVqiUr9678kFBiA35pGTkZ964qAjwPNyhRk+/Rg2LhbxUNVTJYbTXTz/tO
nb21Sl8IIsepXdws8p7sWUHdbUB2bfoNvINuYEKSYFtbWaexyTmIP7iUmfEO66pz
W7IYOafwHzdC47nM90BaeDqhSYsncc+7yranMDjsrMxz9OCLrWntxGGXg0fXhNj8
/4o4SLkUjACV94K/VoAyr1ZisOGmlWqro+j/4jaJErFFZ2cb2asqBGAdv37NuWRe
bICVowQe52Uq42z+oS9J
=P8xi
-----END PGP SIGNATURE-----

Andréas Kühne

unread,
Sep 19, 2018, 8:32:50 AM9/19/18
to django...@googlegroups.com
This is not possible with the mysql database, as mysql doesn't support schemas. Schemas in mysql creates multiple databases - this means that you will have to create a new database for each client. Postgres is a much better solution for these types of things.

Regards,

Andréas


--
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 https://groups.google.com/group/django-users.

heriberto ochoa

unread,
Oct 2, 2018, 3:28:59 PM10/2/18
to Django users
I have try this library:
https://django-tenant-schemas.readthedocs.io/en/latest/

and with db postgres

Devender Kumar

unread,
Oct 9, 2018, 5:51:53 AM10/9/18
to django...@googlegroups.com
Thank you all for putting some light on these.
Regard 
Dev

--
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 https://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages