Turku Nepali Association is a nonprofit organization with the aim of organizing cultural and social events to promote Nepal and Nepalese community in Finland.
- Python 2.7.*
- Django 1.8
- Git
- Pip
- Pycharm(Optional) but recommended ide.
- Sourcetree(Optional) but recommended.
In order to install the Python, Git, Pip
follow the steps described on their web pages. Links are provided above in the requirements section.
In order to install Pycharm. Its recommended that you use the professional version. In order to get the professional version you need to register yourself at Jetbrains web page.
NOTE : Use only your school account normal accounts are not accepted.
Once you are registered you can use the professional version of any jetbrains IDE for free till one year.
Once you are done with the installation. Follow the steps below to run the application.
-
Create a seperate folder.
mkdir github
-
Goto folder location.
cd github
-
Clone the repository to your folder.
git clone https://github.com/amanpdyadav/django-rest-api.git
NOTE : You can use ssh link if you like inorder to avoid the username and password typing all the time.
-
Now you can see an extra folder name django-rest-api. Goto the folder.
cd django-rest-api
-
Installing virtual environment is optional(If you dont want to messup with your python versions and sites packages in the system.)
Follow the link over here [Virtual Environments](http://docs.python-guide.org/en/latest/dev/virtualenvs/))
-
Activate the virtual environment (ONLY IF YOU ARE USING IT).
source venv/bin/activate
-
ONLY IF YOU ARE NOT USING VIRTUAL ENVIRONMENT Install the requirements
pip install -r requirements.txt OR sudo pip install -r requirements.txt (`Use SUDO before if you are installing for all users.`)
Having all the steps above done successfully. Now we are ready to run the application.
-
Goto django-rest-api folder.
cd ~/github/django-rest-api (CHECK the location in your pc)
-
Activate the virtual environment if you are using it else follow to next step.
source venv/bin/activate
-
Run the application.
python manage.py runserver
-
Your application should be running on port 8000 by default. In order to check it open your web browser and use the below url.
http://127.0.0.1:8000/
-
Close the server.
You can close it by Ctrl+C or just close the terminal.