Yes, best to checkout from svn then copy the project.
greg newman
http://20seven.org
Yeah probably. Not even sure if the doc should talk about svn checkout
-- it's irrelevant if you download a release.
James
Thanks for the tip, I will correct the article.
Incidentally, I agree that you should export from svn, not copy the
checked out directory.
Yes, you are correct. You just need to adjust PINAX_ROOT in the WSGI
file and you should be set :)
--
Brian Rosner
http://oebfare.com
If you're doing svn export, you could leave it in there. What is to be
avoided, IMHO, is the combination of svn checkout and developing your
project inside the checkout.
Note that with the change to the .wsgi and manage.py to factor out the
PINAX_ROOT, you should just need to change that.
James
Yes, that was my reasoning. An exported directory can live inside a
subversion tree without too much trouble. And, also, when I first
touched Pinax I wanted to change as little as possible of its
configuration and directory structure to stay out of trouble and not
lose too much time.
But I thank Bob Haugen for pointing out that I was not following best
practices. I updated the article to reflect that. Hopefully I got it
right now.
http://fernandoacorreia.wordpress.com/2008/10/22/exploring-pinax-part-1/
Cheers.
Let me explain my motives. I use Subversion daily and I'm comfortable
with it. I knew that just copying the directory would give me lots of
trouble when I decided to updated Pinax. So the "export" idea was
natural.
I just exported it alongside the sample project because I was just
starting to learn Pinax and didn't want to mess too much with the
structure because I didn't know about its dependencies. I had read the
customization doc, but it was not so clear to me at first sight.
But the official doc is right. I think we should consider Pinax more
like a library, like Django itself, that should be installed and
updated on its own, and the website we build should be a separate
project, with its own version control. So it should be natural to put
Pinax where we store random software (I used ~/opt) and our website
where we put things we're working on or software we deploy (I used
~/Projects).
I think what Fernando did was exactly right. He explains in a reply
and did well :)
> I also see brosner thinking about refactoring to one place:
> http://oebfare.com/logger/pinax/2008/10/30/9/#19:26-896708
> 19:26 brosner
> hmm, i am thinking it might be possible to have PINAX_ROOT in
> settings.py.
> 19:26 jtauber
> really?
> 19:26 jtauber
> isn't it a chicken-and-egg problem?
> 19:27 brosner
> might be. hmm, let me think about this a bit more.
Yeah having PINAX_ROOT in one place seems to be right direction here.
I am still not 100% sure how this will be done yet. I have a use case
on the TWiD codebase as I build it around Pinax so I will be thinking
about this.
Well, I think we're getting outside the realm of what Pinax should
suggest and what comes down to just the developers preference
regarding svn.
If you export rather than checkout, you won't get new updates. If you
checkout and edit in place, your changes may clash with upstream
changes (and you'll have to resolve the merge conflicts). If you
checkout and copy out the project (being careful to delete the .svn
directories in the copy) you won't get updates *for those files* but
will for everything else.
It all comes down to how you want to develop and how important the
latest pinax changes are to you.
James
Just to let everyone know that as of revision 1184 PINAX_ROOT is now
located in your settings. It can be changed in you local_settings.py
making things much more reusable.
Ugh, I should have given more information. Check out these documents now:
http://pinaxproject.com/docs/trunk/deployment.html
http://pinaxproject.com/docs/trunk/customization.html
Specifically the deployment docs should how it is used. I would also
recommend that if you have copied out a project to update your
manage.py (if you are running trunk, not 0.5.0 otherwise you would
need to uprgade to trunk to get this change.)
http://svn.pinaxproject.com/pinax/trunk/projects/complete_project/manage.py
alias svnclear='find . -name .svn -print0 | xargs -0 rm -rf' # removes
all .svn folders from directory recursively
greg newman
http://20seven.org
I think the "copy" notion is more in line with the concept of
downloadable "releases" where you get a package. So there is no
Subversion working copy to "export" from.
Maybe if people are using Subversion to get the edge version they are
in charge of their own versioning strategy. In that case, a copy
probably won't work because you can't just commit your website back
into Pinax's repository...
Man, svn export does this more cleanly...
Right, this is what I was trying to get at earlier. Should the
documentation be for the person downloading a tar.gz or for the person
checking out of svn? I think the primary audience really should be the
former.
Either way, I agree the customization doc needs to be changed :-)
James
I think the main doc should be based on the concept of releases, and
there could be an additional doc about running "edge", or whatever
people call it nowadays.