DjangoCon AU 2013
- No description.
- July 5, 2013
- Number of videos:
In the Django world there are currently two major REST API libraries, with a new one starting to take hold.
But how do you choose?
In this talk I plan to give details on how these three apps (TastyPie, Django REST Framework, and django-nap) differ, as well as overlap.
A compilation of outstanding tips, tricks and tools for meeting perfectionist's deadlines with even greater elegance and efficiency. Topics include project structure tips, time-saving template tags, handy model mixin classes, admin ninja skills, testing tools, robust handling of dynamic hyperlinks within rich text content, replacing raw ID widgets with client-friendly ones, convenient view and model method decorators, novel ways of keeping DRY, harnessing inheritance in CBVs, and as much more as I can fit into my time allocation.
Django 1.5 now supports Python 3, so now's the time to start thinking about porting your apps and sites. Come see how! I'll talk about the porting techniques that work, and present two case studies: porting a site, and porting a reusable app.
Django ship with a wide range of tools to help you test your web application, but some of the best tools for testing Django don't come in the box.
In this talk, you'll get a brief introduction to two of those tools - Mock and Factory Boy - showing when they should be used, and some practical examples of their usage in a Django test suite.
The backend developer, instead, has just three goals: Make the system lightning fast and infinitely scalable; ensure its absolute security and impregnability; and guarantee its absolute correctness, stability, and general perfection in the face of all input at all times.
I'll take that over having to debug CSS rendering quirks any day of the week.
In this talk I'll cover these three goals and how Django helps make each one achievable, including a tour of some of the lesser known features of the framework, such as:
- Magic tricks you can do with Django's caching framework beyond the naive "cache this page", and its ability to take advantage of the browser's own cache in marvellous ways.
- Considerations of Django use and web security. Including the sorts of things Django does a great job of protecting you from, and the things where your own due dilligence will always be required.
Site editors often struggle with editing rich content and managing variations in layout in Django admin. By rich content we mean text, images, video, tables, and so on. Trying to squeeze all this content into a single rich-text editor is like trying to jam a magical pony into a dog kennel. A better approach is to use a rich content framework like FeinCMS. FeinCMS is a sensible, flexible framework which allows rich content of any shape to be manipulated within any Django model in your project.
This talk describes what FeinCMS does and how it works, and most importantly whether it should be pronounced to rhyme with "Vein" or "Vine". The talk is supported with working example code that shows the progression of a FeinCMS project through several levels of functionality, plus some real-world demonstrations of fully-developed functionality.
The types of content available in a given region is defined by a collection of abstract Django models (e.g. one model to represent a passage of text, another model to represent an image, and so on). Developers are free to define their own FeinCMS content types, using all the usual features of Django models.
At the HTML template level, each FeinCMS content item renders a standard template, and can optionally render different templates in different circumstances.
This flexibility allows Django developers to quickly design and build CMSes that match the content and layout perfectly, meaning happier content editors, fewer maintenance headaches and greater magical pony freedom.