M
M
Muriam2021-12-15 12:43:26
Django
Muriam, 2021-12-15 12:43:26

How to import SQLAlchemy library into Django in models.py module?

I installed pyCharm on the command line - pip install SQLAlchemy.
I used to use this database library in Flask-e. In Django, the code for models and queries will be the same (as in Flask) ?
And do I need to set up a virtual environment in Django? I am using pyCharm. Is this environment set there by default when creating the Django project?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alexbprofit, 2021-12-15
@alexbprofit

in settings.py add the required backing to the DATABASES variable, as it is written in the doc

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question