Git Product home page Git Product logo

Comments (8)

rvanlaar avatar rvanlaar commented on June 20, 2024

Hi,

Which version of django recipe are you using?
There is no option for that.
Since 0.99 it uses the system installation if you have that.

I'm not sure what happens when in buildout one would specify a django version and the system version
doesn't match.

from djangorecipe.

summerisgone avatar summerisgone commented on June 20, 2024

Hi!

I'm using latest djangorecipe, 1.2.5. Here's the files:

[buildout]
parts = django
versions = versions

[versions]
djangorecipe = 1.1.2
django = 1.2.5

[django]
recipe = djangorecipe
project = mysite
settings = production

and generated django script:

#!/usr/bin/python

import sys
sys.path[0:0] = [
  '/home/ivan/.buildout/eggs/djangorecipe-1.1.2-py2.7.egg',
  '/home/ivan/.buildout/eggs/Django-1.2.5-py2.7.egg',
  '/home/ivan/.buildout/eggs/zc.recipe.egg-1.2.2-py2.7.egg',
  '/usr/lib/python2.7/dist-packages',
  '/home/ivan/projects/rnd/bdttest/parts/django',
  '/home/ivan/projects/rnd/bdttest',
  ]

import djangorecipe.manage

if __name__ == '__main__':
    djangorecipe.manage.main('mysite.production')

As you can see, PYTHONPATH contains path to Django installed in eggs, not system one. Any help?

from djangorecipe.

rvanlaar avatar rvanlaar commented on June 20, 2024

On 01/06/2012 04:40 PM, Ivan Gromov wrote:

Hi!

I'm using latest djangorecipe, 1.2.5. Here's the files:

[buildout]
parts = django
versions = versions

[versions]
djangorecipe = 1.1.2
django = 1.2.5

Drop the django = 1.2.5.
That'll make sure that the system installed django is used.

from djangorecipe.

summerisgone avatar summerisgone commented on June 20, 2024

Unfortunately not. If I drop django = 1.2.5, django script looks like this:

#!/usr/bin/python

import sys
sys.path[0:0] = [
  '/home/ivan/.buildout/eggs/djangorecipe-1.1.2-py2.7.egg',
  '/home/ivan/.buildout/eggs/Django-1.3.1-py2.7.egg',
  '/home/ivan/.buildout/eggs/zc.recipe.egg-1.2.2-py2.7.egg',
  '/usr/lib/python2.7/dist-packages',
  '/home/ivan/projects/rnd/bdttest/parts/django',
  '/home/ivan/projects/rnd/bdttest',
  ]

import djangorecipe.manage

if __name__ == '__main__':
    djangorecipe.manage.main('mysite.production')

Latest stable Django version has been downloaded, despite I have installed one.

from djangorecipe.

summerisgone avatar summerisgone commented on June 20, 2024

I think it is not exactly bug in djangorecipe, but I hope it is common issue and you may help.
Moreover, there is another reason to use system-installed Django. Recently in debian's python-django package were found and fixed some vunerabilities (http://lists.debian.org/debian-security-announce/2011/msg00028.html).
Our system administrator would be happy to correct them as they appears, but we use separate buildout environment for each project, and we have to update each project.

from djangorecipe.

rvanlaar avatar rvanlaar commented on June 20, 2024

I'll look into the matter a bit more. Stay tuned.

Ivan Gromov [email protected] wrote:

I think it is not exactly bug in djangorecipe, but I hope it is common issue and you may help.
Moreover, there is another reason to use system-installed Django. Recently in debian's python-django package were found and fixed some vunerabilities (http://lists.debian.org/debian-security-announce/2011/msg00028.html).
Our system administrator would be happy to correct them as they appears, but we use separate buildout environment for each project, and we have to update each project.


Reply to this email directly or view it on GitHub:
#43 (comment)

from djangorecipe.

summerisgone avatar summerisgone commented on June 20, 2024

Okay, I figured out a problem. I'm using debian's system buildout 1.4, but include_site_packages option is available only since buildout release 1.5.2. I upgraded to 1.5.2 and made following manipulations:

  1. Upgraded to buildout 1.5.2
  2. In [versions] section deleted django version specification
  3. run buildout in "non-newset" mode, with key -N
$ cat buildout.cfg 
[buildout]
parts = django1
versions = versions

[versions]

[django1]
recipe = djangorecipe
eggs = kwonly

$ buildout -N
Uninstalling django1.
Installing django1.
Generated script '/home/ivan.gromov/projects/rnd/buildout-check/bin/django1'.
django1: Skipping creating of project: project since it exists

$ cat bin/django1 
#!/home/ivan.gromov/projects/rnd/buildout-check/.env/bin/python

import sys
sys.path[0:0] = [
    '/home/ivan.gromov/projects/rnd/buildout-check/eggs/kwonly-1.0.1-py2.6.egg',
    '/home/ivan.gromov/projects/rnd/buildout-check/eggs/djangorecipe-1.1.2-py2.6.egg',
    '/usr/lib/pymodules/python2.6',
    '/home/ivan.gromov/projects/rnd/buildout-check/eggs/zc.recipe.egg-1.3.2-py2.6.egg',
    '/home/ivan.gromov/projects/rnd/buildout-check/.env/lib/python2.6/site-packages',
    '/home/ivan.gromov/projects/rnd/buildout-check/.env/lib/python2.6/site-packages',
    '/home/ivan.gromov/projects/rnd/buildout-check/parts/django1',
    '/home/ivan.gromov/projects/rnd/buildout-check',
    ]


import djangorecipe.manage

if __name__ == '__main__':
    djangorecipe.manage.main('project.development')

I think issue may be closed, my problem is solved.

from djangorecipe.

rvanlaar avatar rvanlaar commented on June 20, 2024

Thanks for taking the time to report this.
In the process of looking at this issue I've found that djangorecipe includes this line,
/home/ivan.gromov/projects/rnd/buildout-check/parts/django1
which isn't used or necessary. That line will be gone with the next release.

Thnx.

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.