Re: Reutilizing views

2007-08-29 Thread Doug B
I think you should take a look at writing a custom inclusion tag, and then using that tag in both views. http://www.djangoproject.com/documentation/templates_python/#inclusion-tags Unless I am misunderstanding, they would be perfect for what you want to do (and are very easy to make). --~--~--

Re: Reutilizing views

2007-08-29 Thread Grupo Django
You are right, entrada is front door, but front page is portada, the front page of a magazine or a newspaper is called portada, and the entrance or front door of a house entrada :-) On 29 ago, 15:39, Etienne Robillard <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 >

Re: Reutilizing views

2007-08-29 Thread Etienne Robillard
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You're welcome, and thanks for the Spanish tip.. (I thought entrada was the appropriate word for front door, but my Spanish skills arent very sharp..) Have to go catch a bus now.. =] Gracias, Etienne On Wed, 29 Aug 2007 05:45:41 -0700 Grupo

Re: Reutilizing views

2007-08-29 Thread Grupo Django
Thanks Etienne! By the way, the minus sign in the view was a mistake, I wanted to write front_page. Anyway, it was just an example, in my case, the view is called 'portada' = 'front page' in Spanish :-) Thanks. On 29 ago, 14:30, Etienne Robillard <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNE

Re: Reutilizing views

2007-08-29 Thread Etienne Robillard
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Grupo, I think it would be better not using the minus sign for naming your front page function. Also, dont put weird attributes directly in a view, but instead use a dictionary in your urls.py (read "Passing extra options to view functions in

Reutilizing views

2007-08-29 Thread Grupo Django
Hello, I'd like to know if there is some way for reutilizing a view. In my case, I have an application to show some data, but I want to show the same data in the front page, among other data from other models. Well, I have figured out this method: def myview(request, returnHTTP=True): t = lo