OKĪpplying contenttypes.0002_remove_content_type_name. If everything goes correctly then we will see this - (myvenv) ~/ContactApp$ python manage.py migrateĪpply all migrations: admin, auth, contenttypes, sessionsĪpplying admin.0002_logentry_remove_auto_add. We need to create a database for our app, so go to console and type the following command: (myvenv) ~/ContactApp$ python manage.py migrate STATIC_ROOT = os.path.join(BASE_DIR, 'static') Go down to the end of the file, and just underneath the STATIC_URL entry, add a new one called STATIC_ROOT:
Now we will start our project (myvenv) ~/ContactApp$ django-admin startproject mysite. Here I’m using Sublime text editor, you can use any other text editor. Now we are done with Django setup and ready to work…. Successfully installed django-2.0.6 pytz-2018.4 Installing collected packages: pytz, django
Scriptcase csrf token expired install#
(myvenv) ~/ContactApp$ pip install djangoĬache entry deserialization failed, entry ignored Now our virtual environment is created, we will install Django for our project. Now we’ll activate virtual environment ~/ContactApp$ source myvenv/bin/activate Contact Appįirst make a project folder in which our all files will be- $ mkdir ContactAppĪfter making project folder we will make virtual environment ~/ContactApp$ python3 -m venv myvenv By this way It will be easy for you to understand and implement steps in below tutorial. Note: I would suggest you to do one of the above tutorial first and then come to this tutorial. I made basic Contact App where you can simply create contacts, edit and delete them.
I used Django Girls Tutorial for this project and it helped me to understand Django structure more.Īt this point, I’ve made two projects but I was not getting enough confidence in Django so I started working on a project without any tutorial and that’s where actual learning happened. It is simple CRUD application in which you can create a poll, you can add questions, choices and you can track votes of each choice.Īfter making Poll app I made my second project which is a blog website. This tutorial covers all your installation process and you can start working on a project as soon as you install all the dependencies.
I started with Django Documentation, There is an official tutorial on Django’s website and it’s really good point to start. In this post, We’ll learn how one can start working with their first Django project. It’s not easy to start working with your first framework, initially it seems daunting task but trust me you can only learn by doing because this way you know where are you lacking and you can have more clear idea about your problems.