Outreachy: Week six
In case you are yet to follow my weekly publications, this article is the sixth of a series of articles detailing my Outreachy internship experience with Wagtail.
Last week, I shared with you three features I find interesting about the Wagtail Conten...
Read: https://activuscode.hashnode.dev/outreachy-week-six
In case you are yet to follow my weekly publications, this article is the sixth of a series of articles detailing my Outreachy internship experience with Wagtail.
Last week, I shared with you three features I find interesting about the Wagtail Conten...
Read: https://activuscode.hashnode.dev/outreachy-week-six
How did I learn Django during my winter vacation?
After completing the first semester of undergrad, I had one and a half months of vacation. So, I was eager to utilize my free time in a productive way. Thus, I decided to learn Django during this time. Note: I already had a good experience in React J...
Read: https://prabeshbista.hashnode.dev/how-did-i-learn-django-during-my-winter-vacation
After completing the first semester of undergrad, I had one and a half months of vacation. So, I was eager to utilize my free time in a productive way. Thus, I decided to learn Django during this time. Note: I already had a good experience in React J...
Read: https://prabeshbista.hashnode.dev/how-did-i-learn-django-during-my-winter-vacation
Why we migrated from Flask to Dango
This article is not about the differences between Django and Flask. Each one has its own advantages and disadvantages. This is the story of our migration.
We built the PoC with Flask. We were happy. Flask is an easy framework to start with. You only ...
Read: https://emremert.dev/why-we-migrated-from-flask-to-dango
This article is not about the differences between Django and Flask. Each one has its own advantages and disadvantages. This is the story of our migration.
We built the PoC with Flask. We were happy. Flask is an easy framework to start with. You only ...
Read: https://emremert.dev/why-we-migrated-from-flask-to-dango
Day 8 - Strings
What are strings?
In python, anything that you enclose between single or double quotation marks is considered a string. A string is essentially a sequence or array of textual data. Strings are used when working with Unicode characters.
Example
name =...
Read: https://viveky.hashnode.dev/day-8-strings
What are strings?
In python, anything that you enclose between single or double quotation marks is considered a string. A string is essentially a sequence or array of textual data. Strings are used when working with Unicode characters.
Example
name =...
Read: https://viveky.hashnode.dev/day-8-strings
Render HTML template in Django
In the previous article, we talked about the views in which we are returning the HTTP response. Now let's see how to render an HTML file as a response.
First of all, you have to change setting.py . Set DIRS option in the templates setting to the dire...
Read: https://nileshdarji.hashnode.dev/django-tutorial-3
In the previous article, we talked about the views in which we are returning the HTTP response. Now let's see how to render an HTML file as a response.
First of all, you have to change setting.py . Set DIRS option in the templates setting to the dire...
Read: https://nileshdarji.hashnode.dev/django-tutorial-3
Django Authentication using an Email Address
Django's built-in User model uses a username as the primary means of identifying a user. However, you may want to use an email for authentication for your web application.
In this article, we will show you how to configure Django to use an email address as the primary means of identifying a user when they log in.
Considering the scope of the …
Read: https://djangocentral.com/authentication-using-an-email-address/
Django's built-in User model uses a username as the primary means of identifying a user. However, you may want to use an email for authentication for your web application.
In this article, we will show you how to configure Django to use an email address as the primary means of identifying a user when they log in.
Considering the scope of the …
Read: https://djangocentral.com/authentication-using-an-email-address/
Djangocentral
Authentication using an Email Address In Django
Django's built in authentication system uses username to identify a user when they log in. However, many websites and applications now allow users
How To Create Custom Context Processors in Django
Django provides a convenient way to add extra data to the context of a template through context processors. These context processors can be used to display information such as the current user, site-wide settings, or even data that is fetched from the database.
With a few lines of code, you can create your own custom context processors and make them available …
Read: https://djangocentral.com/how-to-create-custom-context-processors-in-django/
Django provides a convenient way to add extra data to the context of a template through context processors. These context processors can be used to display information such as the current user, site-wide settings, or even data that is fetched from the database.
With a few lines of code, you can create your own custom context processors and make them available …
Read: https://djangocentral.com/how-to-create-custom-context-processors-in-django/
Djangocentral
How To Create Custom Context Processors in Django
Django provides a convenient way to add extra data to the context of a template through context processors. These context proc
Creating Custom Exception in Django Rest Framework
Django Rest Framework (DRF) provides built-in exception handling that can be used to handle errors and exceptions in a RESTful API.
However, in some cases, you may need to create a custom exception to handle specific error scenarios.
Here's how you can create a custom exception in DRF.
Creating Custom API Exception
Create a new file in your Django …
Read: https://djangocentral.com/creating-custom-exception-in-django-rest-framework/
Django Rest Framework (DRF) provides built-in exception handling that can be used to handle errors and exceptions in a RESTful API.
However, in some cases, you may need to create a custom exception to handle specific error scenarios.
Here's how you can create a custom exception in DRF.
Creating Custom API Exception
Create a new file in your Django …
Read: https://djangocentral.com/creating-custom-exception-in-django-rest-framework/
Djangocentral
Creating Custom Exception in Django Rest Framework
Django Rest Framework (DRF) provides built-in exception handling that can be used to handle errors and exceptions in a RESTful API. However, in
Django automated deployments to Digital ocean using GitHub actions
In this article, you will learn how to build an automated GitHub actions pipeline that deploys a Django application to a digital ocean droplet.
Prerequisites:
A GitHub account.
A docker hub account.
A digital ocean account.
1 Base application.
F...
Read: https://blog.kipchirchirlangat.com/django-automated-deployments-to-digital-ocean-using-github-actions
In this article, you will learn how to build an automated GitHub actions pipeline that deploys a Django application to a digital ocean droplet.
Prerequisites:
A GitHub account.
A docker hub account.
A digital ocean account.
1 Base application.
F...
Read: https://blog.kipchirchirlangat.com/django-automated-deployments-to-digital-ocean-using-github-actions
A Comprehensive Beginner’s Guide to Learning Django Web Development
Introduction: What is Django and How it Can Help Web Developers?
Django is a free and open-source web application framework written in the Python programming language. It is designed to help developers create complex, database-backed web applications...
Read: https://sense.hashnode.dev/a-comprehensive-beginners-guide-to-learning-django-web-development
Introduction: What is Django and How it Can Help Web Developers?
Django is a free and open-source web application framework written in the Python programming language. It is designed to help developers create complex, database-backed web applications...
Read: https://sense.hashnode.dev/a-comprehensive-beginners-guide-to-learning-django-web-development
How to Check if a File Exists With Python
Checking if a file exists is a common task in while working with files. There are several ways to check if a file exists without raising an unwanted exception, each with its own advantages and disadvantages.
Here are a few different approaches.
1. Using the
This method uses the
Read: https://djangocentral.com/how-to-check-if-a-file-exists-with-python/
Checking if a file exists is a common task in while working with files. There are several ways to check if a file exists without raising an unwanted exception, each with its own advantages and disadvantages.
Here are a few different approaches.
1. Using the
os.path.exists()
functionThis method uses the
os.path
module to check if …Read: https://djangocentral.com/how-to-check-if-a-file-exists-with-python/
Djangocentral
How to Check if a File Exists With Python
Checking if a file exists is a common task in Python when working with files. There are several ways to check if a file exists without raising an exception,
How to Iterate Over Rows in a Dataframe in Pandas
Pandas is a powerful library for working with data in Python, and the DataFrame is one of its most widely used data structures. One common task when working with DataFrames is to iterate over the rows and perform some action on each row.
Here are a few different approaches for iterating over rows in a DataFrame in Pandas:
1. Using …
Read: https://djangocentral.com/how-to-iterate-over-rows-in-a-dataframe-in-pandas/
Pandas is a powerful library for working with data in Python, and the DataFrame is one of its most widely used data structures. One common task when working with DataFrames is to iterate over the rows and perform some action on each row.
Here are a few different approaches for iterating over rows in a DataFrame in Pandas:
1. Using …
Read: https://djangocentral.com/how-to-iterate-over-rows-in-a-dataframe-in-pandas/
Djangocentral
How to Iterate Over Rows in a Dataframe in Pandas
Pandas is a powerful library for working with data in Python, and the DataFrame is one of its most widely used data structures. One common task when working
How to Revert the Last Migration in Django
In Django, migrations are used to manage changes to the database schema, such as creating or modifying tables. Sometimes, you may need to revert the last migration to undo changes that were made to the database.
Here's how you can revert the last migration in Django.
Note- First, make sure that you have a backup of your database before making …
Read: https://djangocentral.com/how-to-revert-the-last-migration-in-django/
In Django, migrations are used to manage changes to the database schema, such as creating or modifying tables. Sometimes, you may need to revert the last migration to undo changes that were made to the database.
Here's how you can revert the last migration in Django.
Note- First, make sure that you have a backup of your database before making …
Read: https://djangocentral.com/how-to-revert-the-last-migration-in-django/
Djangocentral
How to Revert the Last Migration in Django
In Django, migrations are used to manage changes to the database schema, such as creating or modifying tables. Sometimes, you may need to revert the l
Understanding related_name in Django Models
In Django,
This attribute is particularly …
Read: https://djangocentral.com/understanding-related-name-in-django-models/
In Django,
related_name
is an attribute that can be used to specify the name of the reverse relation from the related model back to the model that defines the relation. It is used to specify the name of the attribute that will be used to access the related model from the reverse side of the relation.This attribute is particularly …
Read: https://djangocentral.com/understanding-related-name-in-django-models/
Djangocentral
Understanding related_name in Django Models
In Django, related_name is an attribute that can be used to specify the name of the reverse relation from the related model back to the model th
Capturing Query Parameters of request.get in Django
In Django, the request object contains a variety of information about the current HTTP request, including the query parameters. Query parameters are a way to pass additional information in the URL and are used to filter or sort data.
The request object provides a convenient way to access query parameters through the GET attribute.
The GET attribute is a dictionary-like object …
Read: https://djangocentral.com/capturing-query-parameters-of-requestget-in-django/
In Django, the request object contains a variety of information about the current HTTP request, including the query parameters. Query parameters are a way to pass additional information in the URL and are used to filter or sort data.
The request object provides a convenient way to access query parameters through the GET attribute.
The GET attribute is a dictionary-like object …
Read: https://djangocentral.com/capturing-query-parameters-of-requestget-in-django/
Djangocentral
Capturing Query Parameters of request.get in Django
In Django, the request object contains a variety of information about the current HTTP request, including the query parameters. Query parameters are a way to
A comparison of different Python web frameworks and when to use each one
Python is a versatile and powerful programming language that is widely used for web development. There are several web frameworks available for Python that can help developers build web applications quickly and easily. However, with so many options t...
Read: https://webwise.hashnode.dev/a-comparison-of-different-python-web-frameworks-and-when-to-use-each-one
Python is a versatile and powerful programming language that is widely used for web development. There are several web frameworks available for Python that can help developers build web applications quickly and easily. However, with so many options t...
Read: https://webwise.hashnode.dev/a-comparison-of-different-python-web-frameworks-and-when-to-use-each-one
Using htmx and Server-side DataTables.net together in a Django Project
Background
I really enjoy using htmx alongside Django, and try to help others when they're learning to combine these two tools. I often see questions online asking about how to combine htmx with DataTables (aka DataTables.net). Honestly, this threw m...
Read: https://til.jacklinke.com/using-htmx-and-server-side-datatables-net-together-in-a-django-project
Background
I really enjoy using htmx alongside Django, and try to help others when they're learning to combine these two tools. I often see questions online asking about how to combine htmx with DataTables (aka DataTables.net). Honestly, this threw m...
Read: https://til.jacklinke.com/using-htmx-and-server-side-datatables-net-together-in-a-django-project
Django Middlewares: Types and Custom Middleware
Middleware is a framework of hooks into Django's request/response processing. It is a light plugin system for altering Django’s input or output. Each middleware component is responsible for doing some specific function. You can use middleware if you ...
Read: https://bharat-phalak-blogs.hashnode.dev/django-middlewares-types-and-custom-middleware
Middleware is a framework of hooks into Django's request/response processing. It is a light plugin system for altering Django’s input or output. Each middleware component is responsible for doing some specific function. You can use middleware if you ...
Read: https://bharat-phalak-blogs.hashnode.dev/django-middlewares-types-and-custom-middleware
A Step-by-Step Guide to the Django Rest Framework Tutorial
Overview of the Django Rest Framework
The Django Rest Framework (DRF) is a powerful and flexible toolkit for building Web APIs. It provides a full suite of features for developing RESTful APIs, including serialization, authentication, URL routing, an...
Read: https://sense.hashnode.dev/a-step-by-step-guide-to-the-django-rest-framework-tutorial
Overview of the Django Rest Framework
The Django Rest Framework (DRF) is a powerful and flexible toolkit for building Web APIs. It provides a full suite of features for developing RESTful APIs, including serialization, authentication, URL routing, an...
Read: https://sense.hashnode.dev/a-step-by-step-guide-to-the-django-rest-framework-tutorial
Elastic Search with Django Rest Framework
Objective: Adding a full-text search in Django Rest Framework using elastic search.
What is Elastic Search?
Elasticsearch is a distributed, open-source search and analytics engine designed for handling large volumes of data. It is built on top of the...
Read: https://sagaryadav17.hashnode.dev/elastic-search-with-django-rest-framework
Objective: Adding a full-text search in Django Rest Framework using elastic search.
What is Elastic Search?
Elasticsearch is a distributed, open-source search and analytics engine designed for handling large volumes of data. It is built on top of the...
Read: https://sagaryadav17.hashnode.dev/elastic-search-with-django-rest-framework