Prerequisite : Django – Creating project
Django is a great framework which provides you a lot of pre-defined services and workflow so that one can work flawlessly. Django apps are designed to make your code clean and reusable. Django works on the concept of DRY which means Don’t Repeat Yourself.
After creating project , your directory should look like this:
Doesn’t it look a little confusing? Two folders with the same name? So, here is good news. You can change the name of the outer folder because it is just a folder containing your project but please don’t change the name of the inner folder. Let’s rename the outer folder as geeksforgeeks.
Now, it should look like:
After completing Set 2, you have got Django server worked –
but did you notice the warning in red color?
You have 15 unapplied migrations…
We will discuss about such warnings later. For the sake of simplicity, let’s remove the warnings for now. Stop your server using CTRL+C. Run the following command in your terminal:
python manage.py migrate
Now on your command prompt, you will see something like this:
Now run command
python manage.py runserver
Congratulations, you have silenced all warnings
Moving towards Django apps –
We can get rid of
views.py because Django apps are supposed to handle with views. Also, remove these two lines from related files.
from geeks_site.views import hello_geeks path('geek/', hello_geek),
- Dealing with Rows and Columns in Pandas DataFrame
- Warnings in Python
- Handling Ajax request in Django
- Django Introduction and Installation
- Django Introduction | Set 2 (Creating a Project)
- now - Django Template Tags
- Python | User groups with Custom permissions in Django
- Python | Django Admin Interface
- Python | Form validation using django
- Python | Django-allauth setup and Configuration
- Python Django | Google authentication and Fetching mails from scratch
- Python | Uploading images in Django
- Add the slug field inside Django Model
- Intermediate fields in Django | Python
- Django - Creating Apps | Set - 1
- Django - Creating apps | Set - 2
- Views In Django | Python
- Python | Sessions framework using django
- Django Models | Set - 1
- Django Models | Set - 2
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.