Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Integration Of GitHub API with Python Django
Using Github integration, we can get the user verified email id, general information, git hub URL, id, disk usage, public, private repo's, gists and followers, following in a less span of time.These Following steps are needed for Github integration:1. creating git hub app2. Authenticating user and getting an access token.3. Get user information, work history using access token. -
Django Efficient Implementation of Amazon S3 and Cloudfront CDN or Faster Loading
Django by default to store the files in your local file system. To make your files load quickly and secure we need to go for any third party storage systems. AWS s3 is one of the storage service for the Internet. It is designed to make web-scale computing easier for developers. django has a package called django-storages which can be used to store the files in the amazon s3 and serve them from its cloudfront service. -
How to Write Custom Migrations in Django
This blog post will help you to get deeper into Django Migrations - how Migrations works and how to create or add our custom migrations. Migrations are mainly for keeping the data model of you database up-to-date. -
Django Unit Test Cases with Forms and Views
By writing unit test cases, you can evaluate each code component in the initial stage itself and it'll improve your app/code performance. Which is the best practice to test your code and you can easily determine if there are any errors. -
Querying with Django Q Objects
Querying with Django Q objects: Q object encapsulates a SQL expression in a Python object that can be used in database-related operations. Using Q objects we can make complex queries with less and simple code. -
Django - Migrating from Function Based Views to Class Based Views
The single most significant advantage in Django class-based views is inheritance. On a large project it's likely that we will have lots of similar views. instead of writing the repeated code we can simply have our views inherit from a base view. -
Understanding Checkout Flow in Django Oscar
Explaining Django Oscar checkout flow. -
Integration of Linkedin API in Python Django
Using Linkedin integration, we can get the user's verified email id, general information, and work history in less span of time, and a user can also share articles.These Following steps are needed for Linkedin integration:1. Creating a LinkedIn app2. Authenticating the user and getting an access token3. Get user information, and work history using the access token -
How to Create Initial Django Migrations for Existing DB Schema
Django provides the comfort database migrations from its version 1.8, with which we can avoid the usage of third party packages like south. Adding migrations to new apps is straightforward - they come preconfigured to accept migrations, and so just run make migrations once you’ve made some changes. But if your app already has models and database tables, and doesn’t have migrations yet or you got your migrations messed up, you’ll need to convert your app to use migrations. -
Django Conditional Expressions in Queries
Reduce database queries in django with Conditional Expressions. By using Conditional Expressions we can use "If...Elif...Else" expressions while querying the database so that we can reduce the number of queries to the database and increase the response time. If we don't use conditional expressions in queries we have to write raw SQL queries or we have to hit/query the database for multiple times. That's the reason Django included Conditional Expressions from version 1.8 -
Sorl-Thumbnail to Generate Thumbnails in Django
Displaying and Customizing the images in django with sorl-thumbnail. -
Using Gitlab API, Integrating Gitlab in Django Project for Authentication and Access
This is a simple way to integrate gitlab authentication in your django apps.We can get user verified email id, general information, git lab URL and token from Gitlab API.These Following steps are needed for Gitlab integration:1. creating git lab app2. Authenticating user and getting an access token.3. Get user information, git lab URL using an access token. -
Deploying Your Django App on Heroku
Heroku is a platform as a service (PaaS) that enables developers to build and run applications entirely in the cloud.1. installation2. Creating and Deploying app.3. Dependencies Used -
How to Create Thumbnail Image in Django Templates Using Sorl-Thumbnail?
Sorl thumbnail is the package that is being widely used to generate thumbnails in Django. It will create a thumbnail of a given size for the given image, which won't work out in the case of responsive designs. Html5's 'srcset' attribute is the solution for this problem to load proper images to the corresponding resolutions, whose thumbnails are generated with sorl thumbnail. -
Using Python Weasyprint Generate HTML to PDF in Django
WeasyPrint is to combine multiple pieces of information into an HTML template and then converting it to a PDF document. -
Django-REST Framework Object Level Permissions and User Level Permissions
Django-REST User Level Permissions and Object Level Permissions. User Level Permissions and Object level Permissions allow to serve customers based on their access levels or permissions. Let us consider the scenario of Authors, Books, Readers. Authors are only allowed to write the books. Readers are only allowed to read the allowed Books. -
Introduction to API Development Using Django REST Framework with Example
Introduction to API development with Django REST framework. You can build the API for any Django application. Pre-requisites are Django and OOPS(object oriented programming concepts) . In this -
Custom Validations for Serializer Fields Django Rest Framework
we can write custom validations for serializer fields in Django Rest Framework. Validators are used to validate the data whether it is semantically valid or not. Validation simplifies the data processing. Validation avoids the data redundancy -
How to Add a Custom Managers in Django
Django Custom Managers - A Manager is the interface through which database query operations are provided to Django models. At least one Manager exists for every model in a Django application. You can use a custom Manager in a particular model by extending the base Manager class and instantiating your custom Manager in your model. There are two reasons you might want to customize a Manager: to add extra Manager methods, and/or to modify the initial QuerySet the Manager returns. -
How to Use Nested Formsets in Django
Django Formsets manage the complexity of multiple copies of a form in a view. By using formsets, you can know how many forms were their initially, which ones have been changed, and which ones should be deleted. In this blog post, we'll explain how nested formsets are used in django -
How to Convert XML Content into Json Using XMLtodict
We need to process large amounts of data to get the desired results from XML file. xmltodict will help you to process, give JSON formatted data within a less span of time. In this blog post, we'll explain to you how to use in a django project. -
Django Webpacker - A Compression Tool to Bundles CSS, Js Files
django-webpacker is a django compressor tool which bundles css, js files to a single css, js file with webpack and updates your html files with respective css, js file path with a single management command. It also supports django-storages to load compressed css, js files from AWS S3. -
Export HTML Web Page to PDF Using JsPDF
jsPDF is used to generate pdf files in client-side Javascript. You can find the links for jsPDF here and also you can find the link to project homepage. You've to include the scripting files/links in head section to work properly.Tip: We have to download the newest version of the library and include it in the HEAD or at the end of the BODY section. -
How to Document API Requests using Django Rest Swagger
Django Rest Swagger is used to Document your API for eg., Listing all Your project Rest API's in the browser with brief description about the API. In Developing an application, we will write our required API's. To Document these API's we use Django Rest Swagger. -
Working with Django Plugins
This blog describes about how to work with django-plugins. Django Plugin is a Simple Plugin Framework for Django. By using django-plugins, you can make your app more reusable. By using it, you can define plugin points and plugins. It comes with many features like synchronization with database, plugins management from django admin and many more.