• Develop your first web application in Django 1.10 – Part 5

    In last post I talked about using forms, in this last part of the series I am going to discuss about Django Admin and how can this powerful feature be used for records management. Django Admin Before we get into coding, we need to create a superuser(Admin). Open Terminal, go in your project’s root folder where manage.py resides and run the following command: [crayon-5d7e4ebac9605771285190/] The interactive tool will ask a series of things. Once it’s over, check your settings.py file that whether admin app is available in INSTALLED_APPS or not. It should have django.contrib.admin as an app there. if all set, go to http://127.0.0.1:8000/admin and log in with the user you just created. You should…

  • Develop your first web application in Django 1.10 – Part 4

    Learn how to use Django Forms to submit user input data into Database. In previous post I discussed about Db interaction with a Django application and how to pass data in a html view and display it. Now we will move onto next step and will learn how to use HTML forms to store data in database. Django Forms The form I am going to deal is.. yeah, the project form so that I can submit project details. I will create a new folder under tracker/templates and will call it project. The reason to do is that I want to view file separate w.r.t modules. In the file I am going…

  • Develop your first web application in Django 1.10 – Part 3

    In part 2 you learnt how to use templates and views in Django. In this part I am going to discuss how to integrate database with Django app for pulling and storing data. Before we get into it, there are few things that need to be done before we start playing with data and database. Setting up database In order to make our application able to interact with a database, we need to setup the connection of it. Django can connect many RDBMS based db engines. Since Django rely on an ORM, you don’t need to worry about underlying DBMs being used for your app as you can always switch to…

  • Develop your first web application in Django 1.10 – Part 1

    In part 0 I discussed initial installation and configuration. Now it’s time to get into the code. The things I am going to do in this post are: Understanding the concept of Project and Apps in Django world. Creation of App. Using templates to create home page. Projects vs Apps Django offers a very useful modular approach of creating web applications. Unlike other frameworks like PHP Laravel or Rails, Django let you create multiple apps under a project. This idea might look alien to those coming from the background of other frameworks where a project == app and you need to rely on routes etc to divide functionality. Let me take…

  • Develop your first web application in Django 1.10 – Part 0

      Django is a very popular and powerful web framework to make small to large scale web application in Python language. In this series I am going to make a simple issue tracking or bug tracking system in Django 1.10. OhBugz The application I am going to make is named as OhBugz. It is a simple issue tracking application for a single user which helps to track project related issues. It is not going to make JIRA guys sleepless but good enough to learn how to make a web application in Django. Some of the initial screens are:   Installation Since Django is a Python framework so it’s quite obvious…