Overriding the save method in Django - why, when, how?Published on March 10, 2014, 9:15 a.m.
Hi and welcome back for this new Django tutorial. Last week, we have seen how to have a dynamic Bootstrap theme built from variables held in a database. Although this was not very efficient since the theme gets compiled every time it is loaded. This week we are going to see how to cache the compiled version of the theme inside the database and retrieve the cached version whenever we need it.Tutorial Django Read more...
Using your own flavor of Bootstrap in a Django project - Part 2Published on March 3, 2014, 8:20 a.m.
Welcome back for the second and last part of this tutorial. Feel free to (re-)check part 1 before diving into this one!
Last week, we have seen how to setup Compass to watch the canges we make on Sass files and recompile css automagically. Which is fine for a "single-themed project" but, remember, the goal of this entire tutorial series is to build a full Twitter-like feed, which involves having several users and all those users will probably want to theme their homepage in different ways, so this week we will see how to have css built from database-stored values.
Let's take it from where we left it last week.Bootstrap Sass Tutorial pyScss Django Read more...
Using your own flavor of Bootstrap in a Django project - Part 1Published on Feb. 24, 2014, 8 a.m.
Welcome back for another Django tutorial!
"But why do we need a tutorial for using Bootstrap with Django?" are some going to ask. It's just a matter of downloading it and dropping it in your media directory.
Well, that's true if you want to use an out-of-the-box Bootstrap but in this tutorial we are going to show you how to install Bootstrap inside your project and change it's default appearance.
As in the Starting a Django project and deploying it to an Apache server series, we will be using Mercurial as a revision tool.
We will also be using the project built during that tutorial. If you haven't built that project you can clone it from http://code.lasolution.be/mybaseproject.
Once again, this is our way of doing things, not the only nor the best way of doing them.Bootstrap Sass Compass Tutorial Django Read more...
Why is it useful to work with frameworksPublished on Feb. 17, 2014, 9 a.m.
Working with a framework is not always the right way to go but usually when creating a new website or application you will have to develop some "standard" features like a search-engine-friendly url system, an authentication system, a way of checking permissions of authenticated users, listing, deleting and editing of database records and probably a lot of other features. Provided you pick a correct framework, all those things are included out-of-the-box.My 2 cents IT Read more...
Tabs are evilPublished on Feb. 10, 2014, 5 p.m.
I recently ran into a "problem" where some revison control commit was rendered way less usefull because someone replaced spaces by tabs in some files, thus making the whole file appear as diff when inspecting that particular revision.
Tabs vs Spaces has been an ongoing discussion amongst developpers for a very long time so I thought I'd put in my 2 centsCoding standards My 2 cents IT Read more...
Syntax highlighting in HTMLPublished on Feb. 3, 2014, 1:23 p.m.
Starting a Django project and deploying it to an Apache server - Part 4Published on Jan. 27, 2014, 8 a.m.
Tutorial Wsgi Apache Django Read more...
Starting a Django project and deploying it to an Apache server - Part 3Published on Jan. 20, 2014, 9 a.m.
Welcome back for part 3 of this tutorial. If you haven't read them yet, be sure to read part 1 and part 2 before we get started.
These past 2 weeks we have seen how to setup our development environment and we've started our small application and added it to the admin.
This week we are going to build a frontend page to display our statuses then we'll add a created field, that way we can sort statuses when displaying them.
Starting a Django project and deploying it to an Apache server - Part 2Published on Jan. 13, 2014, 9 a.m.
Welcome to part 2 of this tutorial.
In part 1, we have seen how to setup a VirtualEnv and a Mercurial repository with a running Django project. If you haven't read it yet, I encourage you to do so without waiting.
In this second part, we will:
- initialize the database
- create a small feed app
- start exploring the administration interface
Starting a Django project and deploying it to an Apache server - Part 1Published on Jan. 6, 2014, 9 a.m.
There are several ways to start a Django project, here we will be explaining how we do it. Our way is not supposed to be the "best way" nor the "only way", it's just our way and we would like to share.
To start our project we will use:VirtualEnv South Tutorial Wsgi Apache Mercurial Django Read more...