Posts Tagged ‘tips’

CSS Floats and Container Height

Tuesday, August 26th, 2008

<edit>
As pointed out by rborn in the comments below a better way is to simple set the container overflow css property to “auto”. This does the job for you and is a bit tidied that the following solution. However, it might still be use to some of you anyway as it describes the clear property in CSS.
</edit>
It’s been a while since I think I’ve learned something new in the CSS world. So I’m glad to have been recently taught something by a friend.
The problem
For simplicities sake, I’ll just discuss DIV’s. When you make a DIV float (DivB) and its inside [...]

Multiple websites in the same Django project

Tuesday, August 12th, 2008

Want to run two websites from the same Django project? It took me a white to find this one out so I thought I’d post it up here.
Basically you need a couple of steps… First add django.contrib.sites to the installed apps in your settings.py file. Then run a syncdb to create the new tables in database. Head over to the admin panel (or use the python API) and add x number of websites.
The problem now is your settings file needs to state what website it is going to be with the SITE_ID parameter. Therefore you need to make a [...]