Hello

i just started over 2 days ago with python and django (although i have
some expirience in WebObejcts and Tomcat/JSP). I did the tutorial and
started building my first "app" :) and came to my first "bigger"
problem (perhaps understanding problem).

I'd like to build one component "Login" or "Navigation" which can be
places on different templates at different palces. e.g.i'd like to
have the the login component on the right side by default, but
sometimes it should be in the content area.

Till now i learend that i can repalce {% block login %} by extending
one base template and overriding the block.
But what i'd like to do is having one componend "login" and place that
component e.g. inside the login-block on the base page.

I'd like to do this because i want to build up some logic inside that
components and don't like to have that logic on the main template but
in one seperate "file".

Till now i'd do it like this:

base.html: Define the blocks
-> base_login_right.html: Template havin login on the right side
(override only the login block)
-> base_login_right_navigation.html: Template having the login on the
right side and also havin the navigation. (override only the
navigation block)

All my pages would extend base_login_right_navigation.html then.

Somehow this seems very strange to me. Having the login on the left
side would force me to define one new base.html, base_login_left.html
and also base_login_left_navigation.html including all the code once
againe ...

I am prety sure i missed something :)

Any hints would be very welcome ... ( block.super probably? )

Many thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to