Some interesting ideas on an easier base template setup inside Django sites.
This setup allows for easier management of static assets like JS and CSS files.
Some recent work called for a model that was able to show a location via the Google Maps API. The location needed to be entered in the admin and I felt the most user friendly way to go about this was using Google's geocoder (street address to lat/lng coordinates).
Here is how I went about it in my model:
from app.helpers import get_lat_lng class Location(models.Model): address1 = models.CharField('address', max_length=255, blank=True) address2 = models.CharField ...
This is something that will likely be a focal point of my future SEO strategies. Though a bit more work, it looks as though it could really pay off. Take a look at some of the docs linked above. The basic idea is to help search engines gain a better understanding of your websites content. Check out the code sample:
<div itemscope itemtype ="http://schema.org/Movie"> <h1 itemprop="name">Avatar</h1> <div itemprop="director" itemscope itemtype="http://schema ...
I have been using Django's email backend for quite some time.
I use a third party SMTP server and it has always worked quite well. However, after a recent update to Django 1.9.5 my email backend broke. The fix was easy though. I needed to specificly declare in the email backend that I was connecting to my SMTP server via SSL. Here is my by email backend setup:
EMAIL_BACKEND = 'django.core.mail ...