Django templates

Let’s started adding HTML file to support the views that previously created by using Django template engine. Django follows a templating language to understand more about Django template you can look at the documentation.   Assuming you …

Continue reading

Django URLs

The URLs are a way of mapping incoming requests to a view. This mapping is generally done in the urls.py file. The main app(in this case portfolio_blog ) also need to know about this urls.py file. This …

Continue reading

Django views

Views in django are like controller in other frameworks. Views help to process the incomming request pull data from database(if required) and then send response to the client.  Django Views Basics Django views can be …

Continue reading

Django settings

Now that you have models ready and they can also upload images. You need to tell django where to store those images. You will add following setting for your portfolio/blog project. Add settings for letting …

Continue reading

Django models

Now that you have two apps lets create models for our portfolio blog app.  In the blog app, let’s create these models 1. modelĀ for slider– the slider image in the home page should be dynamic, once you …

Continue reading

Django apps

What are Django apps? Django apps are a piece of code that does a specific function. By convention one app should perform one function, however, it depends on developer. Django apps are ways of creating …

Continue reading

Django project structure

Django separates different functionality in different files. The folder structure of a newly created project looks like as follows: Let’s explain some of these file and folders: Once you create a portfolio_blog project, it contains another folder …

Continue reading