Setting Multiple Database for different apps.
- Django
- Python
To get a local copy up and running follow these simple steps:
- Python 3.
-
Create a local copy of this git repository with
git clonecommand.$ git clone https://github.com/dhavall13/InternAssignment.git
-
Create a Virtual Enviornment with the
virtualenvmodule.$ virtualenv . -
Once you’ve created a virtual environment, you may activate it.
$ source Scripts/activate -
Now, install the requirements from the
requirements.txtfile.$ pip install -r requirements.txt
-
Now, apply the migrations with the management command.
$ python manage.py migrate --database=users_db (for users app) $ python manage.py migrate --database=products_db (for products app)
-
Now, create superuser
$ python manage.py createsuperuser --database=users_db
-
Finally, start the developement server with the management command.
$ python manage.py runserver
- Dhaval Chaudhari - Initial work - dhaval