rvanlaar / djangorecipe

A django recipe for buildout
67 stars 44 forks source link

Allow parameter for custom base source directory #72

Closed naftulikay closed 9 years ago

naftulikay commented 11 years ago

When I use the project initialization feature, the project is initialized in the ./ directory rather than in the src directory. My buildout.cfg looks like this:

[buildout]
parts = python_section pydev_section django_section ipython_section
develop = .
eggs = projectname
versions = versions

[versions]
django = 1.5.0
ipython = 0.13.1

[pydev_section]
# for working in eclipse
recipe = collective.recipe.pydevproject
name = myproject
src = src
python_version = python 2.7
python_interpreter = Default
eggs = ${buildout:eggs}

[python_section]
recipe = zc.recipe.egg
interpreter = python
eggs = ${buildout:eggs}

[ipython_section]
recipe = zc.recipe.egg:scripts
eggs = ${buildout:eggs}
    ipython
scripts = ipython

[django_section]
recipe = djangorecipe
project = myproject
settings = development
control-script = django
eggs = ${buildout:eggs}
wsgi = true
fcgi = true

djangorecipe seems to create the source folder in ./ rather than in src/, as would be expected. I can move the project without any problems, but it's kind of annoying, as I'm writing a custom project-generation script.

I'd expect to see a folder at src/myproject, but instead I see ./myproject.

reinout commented 11 years ago

Why would you expect it to be generated in src/? I know some people use that as a default. I also have for a time, but I don't do it anymore.

Note that, for instance, buildout's mr.developer extension uses src/ as the default place to check out projects, leading to a potential clash.

=> Placing it in src/ is more of a personal preference instead of something djangorecipe should force as the new default on all users. Or am I missing something?

naftulikay commented 11 years ago

The request is to provide a parameter to allow users to customize where the project sources are generated. I'm not suggesting we force anything on anyone, only that we provide the option to customize. On Mar 14, 2013 4:10 AM, "Reinout van Rees" notifications@github.com wrote:

Why would you expect it to be generated in src/? I know some people use that as a default. I also have for a time, but I don't do it anymore.

Note that, for instance, buildout's mr.developer extension uses src/ as the default place to check out projects, leading to a potential clash.

=> Placing it in src/ is more of a personal preference instead of something djangorecipe should force as the new default on all users. Or am I missing something?

— Reply to this email directly or view it on GitHubhttps://github.com/rvanlaar/djangorecipe/issues/72#issuecomment-14896884 .

tian-yi commented 11 years ago

I agree with @rfkrocktk, the way now is actually forcing user to create their project at the ./ folder. A parameter would be good.

reinout commented 10 years ago

There are a couple of related issues, I tagged them: https://github.com/rvanlaar/djangorecipe/issues?labels=projectgeneration&page=1&state=open

The important one is #65: do we still need to do it ourselves now that Django does it?

reinout commented 9 years ago

I've removed the project generation functionality as django does it itself already.