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

Python Iterator

Iterator is an alternative implementation for looping through and object. Iterator is an object that can give data  one at a time.  Iterator and iterable Iterable is any item that implements iterator protocol. List, dictionary, …

Continue reading