You have at least 2 possibilities, depending on your exact needs:
-- 1- The preferred method is to Import the models from the app they reside at, like in:
from foo_app.models import bar_model
2- You could also have the models you need to share created at the project level thus making them available to all and any of your apps (this method is rather frowned upon)
3- If what you need is not the share the data among your apps but the structure of the tables, you could also use "abstract base classes". and use use them like in the 2 previous options.
HTH
On Wednesday, September 4, 2019 at 1:10:39 AM UTC-4, Balaji wrote:
On Wednesday, September 4, 2019 at 1:10:39 AM UTC-4, Balaji wrote:
Hi EveryoneCan anybody suggest meHow can i share one Database Sqlite between 2 app on pythonanywhere.Currently i have deployed one project on PythonAnywhere.I have purchases 2 App.Now i can execute 2 App simultaneous.I have deployed app1.pythonanywhere.com and app2.pythonanywhere.comapp1.pythonanywhere.com is my real time hosted project. Before making any changes, i create mirror copy of code and Database Sqlite on app2.pythonanywhere.com, make changes and if changes are proper. I make changes inBut it is time consuming Process. Better solution may be share database and make changes in Business Logic and reflect in orignal one.My Simple Question isHow can i share sqlite database between two Project here.ORIs there any other way to do the same thing more efficiently?Thanks in Advance.--Mr. Shetty Balaji S.
Asst. Professor
Department of Information Technology,SGGS Institute of Engineering & Technology, Vishnupuri, Nanded.MH.IndiaOfficial: bssh...@sggs.ac.inMobile: +91-9270696267
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8208d80d-a0d3-422f-a79e-50f132df97ad%40googlegroups.com.
No comments:
Post a Comment