Two template filters for Django
I want to signal two new template filters for Django. Precise truncate words by chars It truncates the text when it exceeds a certain number of characters and deletes the last word. Adds ‘…’ at the end of the text, only if truncated. The difference between other similar filters is that this deletes the last [...]
Create an image model for your photos in Django with multiple categories
I write this post because Django documentation is not exhaustive for the ImageField. Create an application in your project with: $ python manager.py startapp photos You can use what application name you like. Then create the directory “photos” in your media directory. Enter in the application directory and edit the models.py file: from django.db import [...]