Code sample on how to integrate Django and MongoDB. Open source Django dashboard generated by AppSeed as the user interface of the web application.
To use the following code, you need to have the following tools installed on your computer.
- Python3
- MongoDB server
- Simple, intuitive codebase - built for beginners (can be extended with ease)
Design: Django Soft Dashboard - Free VersionSectionscovered by the design:- Admin section (reserved for superusers)
- Authentication: Django.contrib.AUTH, Registration
- All Pages available in for ordinary users
Persistence:MongoDB
For Unix, MacOS
$ sudo service mongod startFor Windows:
Mongod starts automatically when MongoDB is installed as a service. If not check here
$ git clone https://github.com/app-generator/how-to-integrate-django-with-mongo.git $ cd how-to-integrate-django-with-mongoFor Unix, MacOS:
$ virtualenv -p python3 venv $ source venv/bin/activateFor Windows:
$ virtualenv venv $ .\venv\Scripts\activate.bat(venv)$ pip install -r requirements.txt(venv)$ python manage.py migrate (venv)$ python manage.py createsuperuser # create the admin (venv)$ python manage.py runserverAt this point, the app runs at http://127.0.0.1:8000/
Integrate Django with MongoDB - Open-Source sample provided by AppSeed