Git Product home page Git Product logo

Comments (7)

rvanlaar avatar rvanlaar commented on July 19, 2024

(by jvloothuis)
Your suggestion seems like a great feature. Would you be willing to create a patch for it?

from djangorecipe.

rvanlaar avatar rvanlaar commented on July 19, 2024

(by hazmat)
i'm willing and able, but its not clear to me exactly what should be done, to achieve the two use cases. a simple string expansion block in the middle for initialization purposes is straightforward.

probably the more common use case, would be doing something along the lines of wrapping the wsgi application in another wsgi app ( using the werkzeug debugger for example ), which could either a separate string block at the end or ... ?

the main purpose to me of the wsgi stub that's generated is to just setup the python path.

from djangorecipe.

rvanlaar avatar rvanlaar commented on July 19, 2024

(by jvloothuis)
It sounds like it would be useful to have a sort of template where certain variables are available. That would mean you could have something like ${pythonpath} etc. to use with your custom template. This template could be specified within or outside of the buildout config (I'm not sure which would be best). Does this seem like a good solution to you?

from djangorecipe.

rvanlaar avatar rvanlaar commented on July 19, 2024

(by hazmat)
thats sounds pretty good to me. unfortunately i'm not going to be able to work on this for a few weeks ( april 28th).

from djangorecipe.

rvanlaar avatar rvanlaar commented on July 19, 2024

(by bmat)
Right now if your need is just to use the werkzeug debugger the simplest is to use "django-command-extensions". Then use the command "bin/django runserver_plus".

In my dev.cfg:

[buildout]
extends = base.cfg

parts +=
devtools

eggs +=
Werkzeug

[django]
settings = settings_dev
extra-paths +=
${devtools:location}/django-command-extensions

[devtools]
recipe = infrae.subversion
urls = http://django-command-extensions.googlecode.com/svn/trunk/ django-command-extensions

For me the ultimate solution is to provide a pastedeploy factory app (easy), and use pastedeploy. I plan to experiment this and blog on it if it seems viable.

from djangorecipe.

restless avatar restless commented on July 19, 2024

Sample use case:

I'd like to monitor my projects using new relic, so I'm expected to add to my wsgi file:

import newrelic.agent
newrelic.agent.initialize('/some/path/newrelic.ini')

application = djangorecipe.wsgi.main(projects.settings', logfile='')
application = newrelic.agent.wsgi_application()(application)

from djangorecipe.

rvanlaar avatar rvanlaar commented on July 19, 2024

This was recently fixed in djangorecipe 1.4.

from djangorecipe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.