[Grok-dev] spotlight on: megrok.traject

Martijn Faassen faassen at startifact.com
Mon Jan 25 12:53:15 EST 2010


Hey Ethan,

Ethan Jucovy wrote:
> On Mon, Jan 18, 2010 at 4:21 PM, Martijn Faassen <faassen at startifact.com 
> <mailto:faassen at startifact.com>> wrote:
>  >> [Django + Grok = Grongo]
>  >
>  > Alternatively just a buildout with a Django-Grok would be interesting to
>  > see - we could put it up in grok.zope.org/grokapps 
> <http://grok.zope.org/grokapps> or something. We must
>  > record this for anyone coming along in the future who wants to mess
>  > around with this.
> 
> I'd really like to get a working buildout for this.  It'll definitely 
> make it easier for me to experiment further.  After trying out a few 
> things, I think I just need to extend the buildout that grokproject 
> generates, in three ways:
> 
> 1) Add Django and megrok.traject dependencies
> 
> 2) Generate an additional script, bin/djangoctl, which delegates to 
> Django's django-admin.py
> 
> 3) Add the line `os.environ['DJANGO_SETTINGS_MODULE'] = 
> ${something_from_buildout}` to bin/myproject-ctl, bin/paster, etc.  I 
> think this is the most straightforward and correct place to put that 
> line, if it's not too difficult to modify buildout's script templates.

I'd be nice if we could avoid creating a separate project + template.

What you could do is create a 'grongo' or 'megrok.django' module that:

* has the Django and megrok.traject dependencies

* also creates the script when listed in the dependencies (not sure 
whether it'd need a special buildout to stop this)


 > Task #3 is the one I'm least confident about.  I haven't found any
 > obvious way to do this.  I'd be very grateful if somebody with more
 > buildout knowledge could point me in the right direction, or tell me
 > I'm approaching this wrong and give me a different direction.  :)

Adding this stuff to paster seems to be difficult to do. But would we
be able to add a plugin mechanism to either grokproject or 
grokcore.startup that you could hook this into?

Thanks again for experimenting with this!

Regards,

Martijn



More information about the Grok-dev mailing list