On Mon, Aug 25, 2008 at 4:39 AM, Timothy Clemans
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Regarding the Sage Notebook, I propose that we use a templating engine
> instead of using Python string templates class and writing HTML code
> in the Python code. I have converted the existing templates in Extcode
> to templates that use the Jinja engine, see
> http://trac.sagemath.org/sage_trac/ticket/3923. I also moved the HTML
> for the Account Settings page to a Jinja template, see
> http://trac.sagemath.org/sage_trac/ticket/3937.
>
> I think using Jinja makes the Python code more readable. In addition,
> I like be able to create a base template that other templates build
> upon. Plus it's nice to be able to use for loops and if statements in
> the templates. I use both in the templates at the two tickets.
>
> Jinja is a clone of the templating engine used in the most popular
> Python web framework Django. I am very interested in the possibility
> of migrating the Sage Notebook to Django.
This is something that I have considered a bit.  Django has a lot of
good stuff for templating, a good ORM, and the admin interface is
seriously amazing.

One argument against using Django for the notebook is that you
might end up trying to code around a bunch of the abstractions that
Django puts on top of what is really going on.

Either way, this is definitely something to consider, because in my
experience, Django is really good at what it does.

-Alex







Moving all the Notebook's
> HTML to Jinja templates is the first step in migrating.
>
> If Sphinx, a documentation system, is distributed with Sage then Jinja
> would also be. See the sage-devel thread "Sphinx and the Sage
> Documentation" at
> http://groups.google.com/group/sage-devel/browse_thread/thread/7b0b2f0b34f1f892/
>
> Timothy
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to