views:

70

answers:

3

I am learning Django and got it to work with wsgi. I'm following the tutorial here:

http://docs.djangoproject.com/en/1.1/intro/tutorial01/

My question is: how can I customize the look and feel of Django? Is there a repository of templates that "look good", kind of like there are for Wordpress, that I can start from? I find the tutorial counterintuitive in that it goes immediately toward customizing the admin page of Django, rather than the main pages visible to users of the site. Is there an example of a "typical" Django site, with a decent template, that I can look at and built on/modify? The polls application is again not very representative since it's so specialized.

any references on this would be greatly appreciated. thanks.

+2  A: 

Search for generic CSS/HTML templates, and add in the Django template language where you need it. Because unless you are trying to skin a particular app (such as the admin system), there is nothing Django-specific about any of your HTML.

Ben James
+1, I couldn't have said it better.
Yuval A
Could you recommend a tutorial on Django templates that can help do this? I find the official Django tutorial on this to be really impenetrable when it comes to templating
If you find the incredibly simple examples in the tutorial "impenetrable" then it suggests you have no previous experience of web development. I would recommend experimenting with creating simple dynamic web pages using, e.g., PHP, before diving into a framework like Django.
Ben James
+1  A: 

Actually Django does not have a "look and feel". You are probably referring to the built in Django Admin application. That app comes with its own templates. There are third party applications that can change the Admin interface, Django Grapelli is a great example.

For any other application you want to build yourself, or download. Most likely you'll have to do the templates yourself. In order to come up with something pretty you need to learn about CSS/HTML/JS and design principles as the Django Templates will quite likely be out of your way.

I always recommend HTML Dog for learning the basics of HTML, CSS and JS.

Jj
A: 

The fact that you're thinking in terms of Wordpress templates, and that you think the tutorial's poll application is highly specialised, are hints that you haven't really grasped what Django is. It isn't a content management system or a blog engine, although it can be used to build those things.

There's no such thing as a typical Django site, and it simply doesn't make sense to have pre-packaged templates, because the front end could be absolutely anything at all - like a poll.

You write the template like you would write any standalone HTML+CSS page, perhaps with placeholders for the content, then turn those placeholders into actual Django template tags. If you know how to do write HTML, then you know how to make a Django template.

Daniel Roseman