1 - Why && Installation
1.1. Why??
Django is a Python framework to build Web-Applications. You can use it for small to large projects.
Here you can find some companies which are using django.
Reasons to use django:
- Community: It has 25K readers on Reddit and 1.8K contributors on github.
- Because of the community there are endless custom modules
- large variety of Authentication policies
- ORM´s for SQLLite, Postgresql, MySQL, MariaSQL, MongoDB, ...
- Uses Serializers
- on of the best documentations I ever read
- has Internationalization
- ...
1.2. Requirements
- an IDE like Pycharm or a Texteditor like VIM
- Python 3.5+ download here
- basic knowledge of Python3
1.3. Installation
1.3.1 Projectfolder
Create somewhere a folder, in my case "tut-django".
Open your shell. Go inside this folder, init git and create a requirements.txt
mkdir tut-django
cd tut-django
git init
touch requirements.txt
Install via pip "virtualenv", create a virtualenv and activated it. Why you should use virtualenv?
pip install virtualenv
virtualenv ENV
source ENV/bin/activate
Add the following requirements to the requirements.txt.
django
djangorestframework
markdown
And install it and start your first django project
pip install -r requirements.txt
django-admin startproject tutorial
My project is called "tutorial". Inside you can find a lot of files. Don´t panic. In the next part I will explain what the files and folders means.
Inside the folder tutorial/tutorial you can find a file settings.py. Add the following:
....
INSTALLED_APPS = [
....
'rest_framework',
]
.....
At the end we will try to run the service to check if everything is fine.
cd tutorial
python manage.py runserver
If you can see a line like this everything is fine.
....
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
Try to enter http://127.0.0.1:8000/ . You will find a nice landingpage.
Congratulation! You made it through the first part.
Part 2 soon
Posted on Utopian.io - Rewarding Open Source Contributors
Your contribution cannot be approved because it is not as informative as other contributions. See the Utopian Rules. Contributions need to be informative and descriptive in order to help readers and developers understand them.
Hi, alongside being too short, your contribution was also rejected because
I also had to change the linked repository to the correct one (if you create a GitHub repository with additional material (like code samples), make sure to choose the repository of the project your tutorial is about and not your own repository), so I recommend you read the rules before contributing again in the future.
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @cytex124! You received a personal award!
Click here to view your Board
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @cytex124! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit