REST API made with Django REST
-
Create a virtualenv with
virtualenv myenv
-
Activate the virtualenv with
myenv\Scripts\Activate
-
Install all needed libraries that you can see in the requirements.txt
-
Create a setup project with
django-admin startapp setup
-
Create a new django-rest project with
python manage.py startapp myproject
-
Add the rest_framework and myproject in the INSTALLED_APPS list in the setup/settings.py file
-
Create your entities in the myproject/models.py file
-
Make migrations with the command
python manage.py makemigrations
-
And commit the migrations with
python manage.py migrate
-
Create your entities in the myproject/models.py file
-
Make migrations with the command
python manage.py makemigrations
-
And commit the migrations with
python manage.py migrate
-
To create a new superuser (will have access on the /admin page), run
python manage.py createsuperuser
-
To run, execute the command
python manage.py runserver