[Grok-dev] Re: A Django-like admin in Grok

Martijn Faassen faassen at startifact.com
Thu Apr 24 17:32:12 EDT 2008


Robert Gravina wrote:
>> How hard is it to use Django templating outside of Django? Is it a
>> seperate library?
> While I'm new to Django, it seems apparently, it can be done. If you 
> look at the last section of this page it describes what you need to do 
> to use it outside of Django:
 > http://www.djangoproject.com/documentation/templates_python/

Cool. I wonder whether they package it up somewhere onto PyPI.

>> If so, it wouldn't be too hard to integrate this
>> into a Grok extension, as we have a pluggable templating language
>> system. We could throw in this adaptation bit too. :)
> :)... Django tempalates differ from ZPT in that they are not 
> XML-based... so your output may not be valid, or even XHTML at all (can 
> be used as a general text processor). Not sure how this effects Grok...

No problem at all; Grok (and Zope 3) can work with text-based processors 
just as well as XML based. In the end what comes out will be strings, 
after all.

>> I think having this would be great, as I've heard people say good
>> things about the Django templating language. Having this would also
>> make it easier for people familiar with Django to learn Grok.
> Yes they have been easier to work with than XML-based templates in my 
> experience... according to the Django people, designers have been able 
> to use them effectively.

Yeah, some people really prefer text-based templating. I lean towards 
XML-based templating myself, but I'm pretty agnostic really and I can 
see benefits to both approaches.

> Well, it seems that I've missed my chance with Grok on this project, and 
> was entirely my fault because I didn't check it out or consult here 
> properly before diving into working on the site in Django.. 

Actually I'm very glad you came here and talked about this, no matter 
what stage of development were in! This kind of feedback is what we need 
to get to see what things are important in Grok. It already pleases me 
quite a bit people are even considering Grok in the first place. :)

Anyway, I think the general message is clear: create something that 
helps people put up CRUD-style UIs in a hurry.

> Django *does* have a nice admin, and application-level plugins,

What are application-level plugins?

> which I would 
> happily trade for a unit-tested, interface-adapting framework but  
> didn't think I could replicate all that in the time we have :(.

I'm quite sure it'd have been quite a struggle if you'd have gone for 
Grok, actually. Not because it'd be particularly hard by itself, but 
because our learning curve needs to be improved. Django's story for 
learning it, at this point, is still better than Grok's. I believe we're 
slowly catching up, though.

In addition, a system that already *has* a feature is just way ahead of 
a system that doesn't have the feature yet. So if you're looking for 
that feature or set of features, it makes a lot of sense to pick the 
system that has it instead of developing it yourself. So, when you're 
looking for, say, a CMS that is close to what, say, Plone does, then 
you're probably better off using Plone than trying to reproduce it all 
in Grok.

There are of course a lot of opportunities in building features that 
*aren't* well supported by other systems yet. So by that route I'm sure 
Grok will eventually build up enough of a feature-mass on top of it to 
attract all sorts of developments.

> Martjin's megrok:bread or Sebastions ProtonCMS could be a really good 
> base to get Grok into the mainstream web development world... if 
> frustrates me that Django is so popular despite it's (IMNSHO) very bad 
> design. Python needs a well designed, flexible web framework with basic 
> content management! I can see basically two frameworks that could 
> actually do this if they have the content editing sorted - Grok, and 
> Nevow... Nevow doesn't have workflow and a few other features ,but the 
> Twisted guys sure know how to code too :)

We're working on it. A bit of time.

> I might have to pass on Grok for this project but I'd like to contribute 
> in some way to this effort if I can...

You already are contributing a lot! If you're interested in contributing 
more I'd be quite interested in seeing a plugin that uses Django's 
template language. We already have Genshi support around as well, so 
having both would make the road to Grok from TurboGears/Pylons and 
Django lot easier (and the other way around too, but we don't mind. :)



More information about the Grok-dev mailing list