Django community: Community blog posts RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
What's New in the Third Edition of Web Development with Django Cookbook?
A couple of months ago the third release of Django Cookbook was published under the title Django 2 Web Development Cookbook - Third Edition. This edition was thoroughly and progressively re-written by Jake Kronika, the guy who had reviewed my second edition and had added a lot of value to it. I was sure that he wouldn't disappoint the readers, so I invited him to write the update. In this article, I will guide you through the main new highlights of over 500 pages of this new book. Up to Date Just like William S. Vincent's books, Django 2 Web Development Cookbook - Third Edition is adapted to Django 2.1 and Python 3.6. So you will be dealing with the state of the art technologies building your Django projects. Unicode strings, f-strings, super() without parameters, HTML5 tags, and object-oriented JavaScript to mention a few are used all over the book. The code is carefully generalized and even more adapted to the Don't-Repeat-Yourself (DRY) principle. Working with Docker Docker is one of the most popular deployment technologies and Jake gives a good compact introduction how to use it with Django. Using Environment Variables for Configuration 12-factor app guidelines suggest saving app … -
Python and Django Logging in Plain English
If you’ve ever written a program and printed out a value to see what’s going on during execution, then you understand at some level why logging is so valuable. Knowing what’s happening in your code at a point in time is enormously useful from both technical and business perspectives. This knowledge lets developers and product managers make smart choices about what systems to fix or modify and lets them see what actions users take when they use your software.Thankfully, Python has a much more powerful, built-in library for logging than the print() function, and it’s named, simply enough, logging. The library is flexible and customizable but has a reputation for being hard to understand at first because there are multiple moving pieces. Django uses this library by default and makes it easy to integrate into your project.So while this is technically an article about logging with Django, the best way to explore that topic is to understand the logging library in general, and how Django uses it specifically. This is part two of a four-part series about what happens when the setup function in __init__.py gets executed.How Django accesses project settings.How Django and Python manage logging. Why Django allows the … -
Django 2 Ajax CRUD with Python 3.7 and jQuery
In this tutorial, you'll learn how to send Ajax requests in Django 2 and Python 3.7 to add CRUD operations in your application and manipulate your Django models and database without having to refresh your web pages each time. Ajax stands for Asynchronous JavaScript and XML and it's a way for getting data from the server and updating the page on the fly without refreshing the page. Creating a Virtual Environment Make sure you have Python 3 installed (Python 3.7 is the latest as of this writing) and start by creating a virtual environment for your project's packages: $ python -m venv myenv Next, activate your virtual environment using: $ source myenv/bin/activate Installing Django 2 and Creating a Project Now, you need to install Django using pip: $ python -m pip install django Next, create a Django project using: $ django-admin startproject djangoajaxdemo Next you need to create a Django application using the manage.py script: $ cd djangoajaxdemo $ python manage.py startapp rooms Next you need to add it to your project's installed apps array in the settings.py file: INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rooms' ] Adding jQuery In this tutorial, we'll be using jQuery to … -
Python Overtakes Java
It's fitting that the first bl... -
Get List of Current Users
We get this question a good am... -
Facebook's Parse is Closing
[Parse](http://parse.com/) is ... -
Python Cheat Sheet
A quick reference guide for us... -
My Equipment
### Computer Laptop: [http:... -
AngularJS vs jQuery
### AngularJS is a framework ... -
Django App Structure
To make your individual Django... -
Syncdb is ... gone?
Yup `python manage.py syncdb` ... -
A Fantastic Ted Talk
This is by far one of the most... -
Everything coming in 2017
### Topics - [Django v1.11](h... -
*args and **kwargs
So when you write any given fu... -
Which Version to Use?
When you watch or read tutoria... -
New URL Structure for Django
Django 1.10 has changed the re... -
Testing Email in Django with send_mail
Sometimes you need to test tha... -
TemplateDoesNotExist error
I see this error come up a lot... -
post_save vs pre_save vs override save method
Which is better ... `post_save... -
Hats off to you...
CFE Community! Hats off to ... -
Introducing Ask
At CFE, our fundamental goal i... -
Local Domain & Subdomain Testing in Mac & Linux
What to do when you want to te... -
Activate, Reactivate, Deactivate your Virtualenv
<div class='alert alert-warnin... -
Random String Generator in Python
Sometimes you need a random st... -
A Unique Slug Generator for Django
Using the [Random String Gener...