CRUD Examples with Function Based Views
Learning how to CRUD data is a core skill for any web developer. CRUD stands for Create, Read, Update, Delete.
In this tutorial, I am going to the use the example of building a blogging app in Django. I am going to show you the code to create blog po...
Read: https://aliceridgway.hashnode.dev/crud-examples-with-function-based-views
@django_prog
Learning how to CRUD data is a core skill for any web developer. CRUD stands for Create, Read, Update, Delete.
In this tutorial, I am going to the use the example of building a blogging app in Django. I am going to show you the code to create blog po...
Read: https://aliceridgway.hashnode.dev/crud-examples-with-function-based-views
@django_prog
Django Foreign Key Example - How to Add Categories to a Blog
Foreign keys give you the power to link the tables in the database as you see fit, but they can be confusing at first.
In a previous post, we went through how to use Foreign Keys.
Today, I’m going to go through a full example of how you can add a For...
Read: https://aliceridgway.hashnode.dev/django-foreign-key-example-how-to-add-categories-to-a-blog
@django_prog
Foreign keys give you the power to link the tables in the database as you see fit, but they can be confusing at first.
In a previous post, we went through how to use Foreign Keys.
Today, I’m going to go through a full example of how you can add a For...
Read: https://aliceridgway.hashnode.dev/django-foreign-key-example-how-to-add-categories-to-a-blog
@django_prog
How to create a base template for your Django project
Django templates store the HTML for your projects. Django uses its own templating language to allow you to add data from the back-end into your pages.
Each page of your app will have its own template file but many pages will share some elements like ...
Read: https://aliceridgway.hashnode.dev/how-to-create-a-base-template-for-your-django-project
@django_prog
Django templates store the HTML for your projects. Django uses its own templating language to allow you to add data from the back-end into your pages.
Each page of your app will have its own template file but many pages will share some elements like ...
Read: https://aliceridgway.hashnode.dev/how-to-create-a-base-template-for-your-django-project
@django_prog
How to make a Foreign Key field non-nullable with a default
To make a foreign key field in Django non-nullable, you need to provide a default value for the existing rows. You might want to also provide a default value for new rows. Adding a default is easy when the value is a string or a date, but not when yo...
Read: https://aliceridgway.hashnode.dev/how-to-make-a-foreign-key-field-non-nullable-with-a-default
@django_prog
To make a foreign key field in Django non-nullable, you need to provide a default value for the existing rows. You might want to also provide a default value for new rows. Adding a default is easy when the value is a string or a date, but not when yo...
Read: https://aliceridgway.hashnode.dev/how-to-make-a-foreign-key-field-non-nullable-with-a-default
@django_prog
How to upload images in Django with Pillow (blog example)
A common feature of Django projects is the ability to upload images. I’m going to show you an example where we add feature images to a blogging application.
For this tutorial, I’m going to assume you already have a project to add images to. If not, y...
Read: https://aliceridgway.hashnode.dev/how-to-upload-images-in-django-with-pillow-blog-example
@django_prog
A common feature of Django projects is the ability to upload images. I’m going to show you an example where we add feature images to a blogging application.
For this tutorial, I’m going to assume you already have a project to add images to. If not, y...
Read: https://aliceridgway.hashnode.dev/how-to-upload-images-in-django-with-pillow-blog-example
@django_prog
How To Resize Images For Your Django Project using Pillow (Blog Example)
As a Django developer, you might want to prevent users from uploading large images.
If the uploaded images are wider than the container they will be displayed in, then they are too big. For you, the developer, it means having to pay for more storage....
Read: https://aliceridgway.hashnode.dev/how-to-resize-images-for-your-django-project-using-pillow-blog-example
@django_prog
As a Django developer, you might want to prevent users from uploading large images.
If the uploaded images are wider than the container they will be displayed in, then they are too big. For you, the developer, it means having to pay for more storage....
Read: https://aliceridgway.hashnode.dev/how-to-resize-images-for-your-django-project-using-pillow-blog-example
@django_prog
To Do List: Part 8 - Filtering Tasks
In this tutorial, we are going to implement a basic filter.
This will work by specifying how we want to filter our tasks in the URL and display the filtered data set by loading a new page.
The advantage of this approach is you won't need to write any...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-8-filtering-tasks
@django_prog
In this tutorial, we are going to implement a basic filter.
This will work by specifying how we want to filter our tasks in the URL and display the filtered data set by loading a new page.
The advantage of this approach is you won't need to write any...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-8-filtering-tasks
@django_prog
To Do List - Part 7: Deleting Tasks
Welcome to Part 7 of my tutorial series on how to create a To Do List app with Django. The tutorial series so far has covered models, views, forms, templates and updating tasks.
In this part, we will cover deleting tasks. Users will be able to remove...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-7-deleting-tasks
@django_prog
Welcome to Part 7 of my tutorial series on how to create a To Do List app with Django. The tutorial series so far has covered models, views, forms, templates and updating tasks.
In this part, we will cover deleting tasks. Users will be able to remove...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-7-deleting-tasks
@django_prog
To Do List - Part 6: Edit Objects
In the previous tutorials, we have been building a To Do list app.
We created a page that lists all the tasks and added a form so that the user can add their own.
In the previous tutorial, we made improvements to our templates. Here, we added buttons...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-6-edit-objects
@django_prog
In the previous tutorials, we have been building a To Do list app.
We created a page that lists all the tasks and added a form so that the user can add their own.
In the previous tutorial, we made improvements to our templates. Here, we added buttons...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-6-edit-objects
@django_prog
To Do List - Part 5: Improve the UI
Welcome to Part 5 of my tutorial series on creating a To Do list app with Django.
In Parts 1 to 4, we focused on adding functionality to our app. In this part, we will focus on building out the UI. We will improve the layout. In Parts 6, 7 and 8, we ...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-5-improve-the-ui
@django_prog
Welcome to Part 5 of my tutorial series on creating a To Do list app with Django.
In Parts 1 to 4, we focused on adding functionality to our app. In this part, we will focus on building out the UI. We will improve the layout. In Parts 6, 7 and 8, we ...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-5-improve-the-ui
@django_prog
To Do List - Part 4: Adding a form
Welcome to Part 4 of my tutorial series on building a To Do List app with Django. In the previous tutorial, we added views to process requests from the user. In this tutorial, we will create a form that will let users submit new tasks for their To Do...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-4-adding-a-form
@django_prog
Welcome to Part 4 of my tutorial series on building a To Do List app with Django. In the previous tutorial, we added views to process requests from the user. In this tutorial, we will create a form that will let users submit new tasks for their To Do...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-4-adding-a-form
@django_prog
To Do List - Part 3: URLs, Views & Templates
Welcome to Part 3 of my tutorial series to build a To Do list app. In the previous tutorial we added a model. This means we have a table in the database to store data but we need a way for our users to interact with it.
In this tutorial, we are going...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-3-urls-views-templates
@django_prog
Welcome to Part 3 of my tutorial series to build a To Do list app. In the previous tutorial we added a model. This means we have a table in the database to store data but we need a way for our users to interact with it.
In this tutorial, we are going...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-3-urls-views-templates
@django_prog
To Do List - Part 2: Apps & Models
Welcome to Part 2 of my To-Do list tutorial series.
In Part 1, we set up a Django project with a database and created a user. In this tutorial, we going to create a model, which will be used to create a table in our database.
This is what we are goin...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-2-apps-models
@django_prog
Welcome to Part 2 of my To-Do list tutorial series.
In Part 1, we set up a Django project with a database and created a user. In this tutorial, we going to create a model, which will be used to create a table in our database.
This is what we are goin...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-2-apps-models
@django_prog
To Do List - Part 1: Installing Django
This tutorial is part of a series on creating a To Do List app. If you just want to start up a new Django project, you're in the right place.
This tutorial is going to cover how to start a new Django project.
These are the steps we’re going to take t...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-1-installing-django
@django_prog
This tutorial is part of a series on creating a To Do List app. If you just want to start up a new Django project, you're in the right place.
This tutorial is going to cover how to start a new Django project.
These are the steps we’re going to take t...
Read: https://aliceridgway.hashnode.dev/to-do-list-part-1-installing-django
@django_prog
Tutorial: Create a To Do List App
This is a beginner friendly Django tutorial to create a To Do list app.
This will teach you how to start a Django project from scratch. You will learn how to Create, Read, Update and Delete (CRUD) data from a SQLite database and build a website that ...
Read: https://aliceridgway.hashnode.dev/tutorial-create-a-to-do-list-app
@django_prog
This is a beginner friendly Django tutorial to create a To Do list app.
This will teach you how to start a Django project from scratch. You will learn how to Create, Read, Update and Delete (CRUD) data from a SQLite database and build a website that ...
Read: https://aliceridgway.hashnode.dev/tutorial-create-a-to-do-list-app
@django_prog
How To Resize Images For Your Django Project using Pillow (Blog Example)
As a Django developer, you might want to prevent users from uploading large images.
If the uploaded images are wider than the container they will be displayed in, then they are too big. For you, the developer, it means having to pay for more storage....
Read: https://aliceridgway.hashnode.dev/how-to-resize-images-for-your-django-project-using-pillow-blog-example-1
@django_prog
As a Django developer, you might want to prevent users from uploading large images.
If the uploaded images are wider than the container they will be displayed in, then they are too big. For you, the developer, it means having to pay for more storage....
Read: https://aliceridgway.hashnode.dev/how-to-resize-images-for-your-django-project-using-pillow-blog-example-1
@django_prog
How To Add a Text Editor To A Django Blog With Summernote
Building a blog with Django is a popular project for beginners but how many people would actually use the end result?
Most tutorials use a TextField to store the post body with HTML's default textarea widget. This isn’t very good on its own because t...
Read: https://aliceridgway.hashnode.dev/how-to-add-a-text-editor-to-a-django-blog-with-summernote
@django_prog
Building a blog with Django is a popular project for beginners but how many people would actually use the end result?
Most tutorials use a TextField to store the post body with HTML's default textarea widget. This isn’t very good on its own because t...
Read: https://aliceridgway.hashnode.dev/how-to-add-a-text-editor-to-a-django-blog-with-summernote
@django_prog
What **kwargs are & when to use them in your Django project
kwargs is short for "keyword arguments", which are optional arguments of a Python function.
In Django, you may come across functions which contain *args and/or **kwargs as inputs.
As someone who learned Django without prior experience in Python, I fo...
Read: https://aliceridgway.hashnode.dev/what-kwargs-are-when-to-use-them-in-your-django-project
@django_prog
kwargs is short for "keyword arguments", which are optional arguments of a Python function.
In Django, you may come across functions which contain *args and/or **kwargs as inputs.
As someone who learned Django without prior experience in Python, I fo...
Read: https://aliceridgway.hashnode.dev/what-kwargs-are-when-to-use-them-in-your-django-project
@django_prog
How to set up Black to automatically format your Django project
Black is an auto-formatter for Python projects. It can be configured to automatically format your code when you save your files. This means you will spend less time formatting your code and have your code formatted in a clear and consistent way.
Blac...
Read: https://aliceridgway.hashnode.dev/how-to-set-up-black-to-automatically-format-your-django-project
@django_prog
Black is an auto-formatter for Python projects. It can be configured to automatically format your code when you save your files. This means you will spend less time formatting your code and have your code formatted in a clear and consistent way.
Blac...
Read: https://aliceridgway.hashnode.dev/how-to-set-up-black-to-automatically-format-your-django-project
@django_prog
How to keep track of packages for your Django project with pip-tools
As a developer, it is important to keep track of what 3rd party packages are installed on your virtual environment. In order for your project to work on other machines, you need to make sure each environment uses the same packages and the same versio...
Read: https://aliceridgway.hashnode.dev/how-to-keep-track-of-packages-for-your-django-project-with-pip-tools
@django_prog
As a developer, it is important to keep track of what 3rd party packages are installed on your virtual environment. In order for your project to work on other machines, you need to make sure each environment uses the same packages and the same versio...
Read: https://aliceridgway.hashnode.dev/how-to-keep-track-of-packages-for-your-django-project-with-pip-tools
@django_prog