GitHunt
JF

jferragut/Class-Project-Backend

Crypto Tracker Backend API - Provides all hooks for database manipulation

Installation

  1. Change your python version to 3
$ sudo mv /usr/bin/python /usr/bin/python2 
$ sudo ln -s /usr/bin/python3 /usr/bin/python
  1. Download django and rest_framework
$ sudo pip install django
$ sudo pip install djangorestframework
  1. Start a django website
$ django-admin startproject <project-name>
& cd <project-name>

A django project is divided in one or more apps, that way you can re-use any app on other proyects.

  1. Create your first app
$ python manage.py startapp <app1_name>
  1. Run the migrations
$ python manage.py migrate
  1. Add your website URL to the ALLOWED_HOSTS on settings.py
ALLOWED_HOSTS = [
    'django-example-alesanchezr.c9users.io',
    ]
  1. Run django on c9 ports by doing
$ python manage.py runserver $IP:$PORT

Aditional Tutorials

/blob/master/quick_tutorials/ADMIN.md

Languages

Python97.3%HTML1.7%Shell1.0%

Contributors

Created January 23, 2018
Updated February 16, 2022