0

I am planning to create a website in Python and i am thinking of using Django as its more structured and suitable for large scale application.

I have worked with Flask in past and i used sqlalchemy with raw sql to interact with database, i am not sure how to achieve the same with Django? as i see i have to specify db engine in settings.py. My backend will be MySQL / MongoDB but i want to stick to raw SQL. I have written class which uses pymongo and django model calls particular methods from my mongo class to access DB. There is no MongoDB engine specified in Django setting file. So design is,

Views -> Model -> MyMongoDAL (this class has all the methods related to mongoDB)

I tried this with Sybase as Backend and ported the existing Flask project -> Django (support for sybase is really terrible! hence my own DAL) and its working like charm with very few changes.

I have gone through this Django with MongoDB but its not answering my question, what i have done is good or bad? something that i will face in later stages when app grows in terms of capacity, more from your experience in similar situation.

Thanks, NM

Community
  • 1
  • 1
Ninad Mhatre
  • 549
  • 1
  • 7
  • 17

0 Answers0