Search results for: django
83 results found.
User Registration in Django
Django authentication framework (django.contrib.auth) provides a form named UserCreationForm (which inherits from ModelForm class) to handle the creation of new users. It has three fields namely user…
Read MoreDjango Logging Users In and Out
Django provides built-in URL patterns and view functions for logging users in and out. But before we add them to our project, we will create login and logout system on our own using some utility func…
Read MoreBuilding Contact Us Form
In this lesson, we are going to create a Contact form. This will allow our visitors to send feedback directly to the admin email address. The forms we have built in the last few chapters were closel…
Read MoreCreating Trending Snippet Page
Our next task is to display a list of snippets page based on the number of hits a snippet has received. We want to display a list of trending snippets across all languages at URL path /trending/ and …
Read MoreBuilding Djangobin - The First Steps
In the previous few chapters, we have learned quite a lot about Django. In this chapter, we will take the first steps to build our djangobin application. Creating Snippets # Let's start by build…
Read MoreHandling Media Files in Django
In Django, files which are uploaded by the user are called Media Files. Here are some examples of media files: A user uploaded image, pdf, ppt etc. Images of products in an e-commerce site. Profile…
Read MoreHandling Static Content in Django
At this stage, our site looks very simple because we haven't yet added any images, CSS, and JavaScript to it. In Django, we refer to these files as Static Files as they don't change frequentl…
Read MoreDjango Rendering Form Fields Manually
In the previous lesson, we have seen several methods to display forms. No doubt that these methods allow us to quickly create forms but they also give the least control over how they are rendered. If…
Read MoreDisplaying Forms in Django
So far we have been using Django Shell to demonstrate how the forms work. In this lesson, we will learn how to display forms in our templates. Django provides the following three methods to display …
Read MoreDjango Form Basics
The syntax of creating forms in Django is almost similar to that of creating models, the only differences are: Django form inherits from forms.Form instead of models.Model. Each form fields inherit…
Read More