Context to a Template

2009-05-29 Thread tsop
Hello, I am attempting to write a small CMS application in hopes of learning Django more in depth. Currently a page is just for editing textual content and it gets sent to a template (much like the flatpage) the problem is if I had a contact page, that happens to have a form on it, what would be

Re: sending a context to a template by calling a function with parameters.

2008-10-13 Thread [EMAIL PROTECTED]
Thanks! great advice. I am going to try to pass the data from the view. On Oct 13, 2:56 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 13 oct, 20:59, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > Hello, > > > I want to return a context of data to the template > > I assume you me

Re: sending a context to a template by calling a function with parameters.

2008-10-13 Thread bruno desthuilliers
On 13 oct, 20:59, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > I want to return a context of data to the template I assume you mean "pass", not "return". > that contains > information in the models. I want to pass in variables that dictate > what is returned. > > Example: > author

sending a context to a template by calling a function with parameters.

2008-10-13 Thread [EMAIL PROTECTED]
Hello, I want to return a context of data to the template that contains information in the models. I want to pass in variables that dictate what is returned. Example: author1.get_books_published_after Then it grabs all the data via a method in the model and returns it. Should I instead use the