Hello Orschiro,

If you are the sole developer working in your home directory is OK but
if you grow you'll have to grant access to your home directory to
someone else.  If you are building applications on a *nix type server
I'd recommend storing your base project(S) in /opt/django.  Any
production code that isn't maintained by the systems patching system I
try to put in either /usr/local or in /opt and in the case of django I
have always used /opt.  Additionally I make sure the directories all
belong to the django group and so do the developers.  By doing this
and setting change group id by chmod 2775 files are created all
belonging to the same group and can be worked on by more than one
person.  Assuming an appropriate umask is also being set.

I run one Apache server with virtual hosts for each of the django
projects that I serve with a separate directory link serving the
static files.  The static files are in /var/www/html/
project_site_media and I create symbolic link to them in my project
base directory for site_media while developing and servery with
runserver but in production I don't have django server any static
files. Each project has a templates directory as does each
application.  The base templates directory has a few templates and is
listed first in the templates path listing in settings.  It typically
contains login.html, logout.html, base.html, branded.html and
genericform.html.  I also have a minimal base.html and branded.html in
each applications templates directory so I can work with applications
standalone but override them all with the project specific base and
branded templates.  All images, css, js etc. are in the static
directory.  With each applications templates directory I stick all
templates in a sub directory named exactly the same as the
applications.  This is so applications don't run into each others
report.html upload.html etc.

I do all development on the development server using the built in
server and in a separate directory from the production sever.  I use
subversion and check all applications in but not the project.  Once I
get the applications working correctly I check it into subversion and
then go to the production server and check it out or run an update.
If database changes are required that syncdb won't handle like adding
columns etc.  I will create a sql script that will handle the changes
and run it at that time.  Typically it will add a column or something
along those lines.  I prefer to make these changes manually and have a
script ready to go.  Don't forget to take a full backup prior to
making changes just in case ;)

One other point I'd like to bring up is that I don't believe in using
the project name in references.  Don't import from project.app.models
but from app.models which will work fine and allow you to copy,
checkout etc your application and add it to setting etc. without
having to modify any of you code.

Include a separate urls.py file in each application and include it
from your projects urls.py.  Typically to add an application to a
configured project I so a svn chechout of the applicaiton.  Add it to
applicatoins and template path sections in settings and then add a
line in urls.py to include the application urls.py this is all that it
generally take to get an application up and running with a branded
look and feel :).

Sorry for the long answer, hope it's helpful.

Mark
On Sep 15, 1:28 pm, orschiro <[email protected]> wrote:
> Hello guys,
>
> first, I know it is not that important how to do this but as I'm
> pretty knew and callow I'd like to know how some experienced users do
> that.
>
> At the moment I have just a normal user account besides my root that
> stores all my django projects. Also my django trunk lives in there.
>
> Another point what interests me. Are you using a central directory for
> static files and templates etc. that are available for all your
> projects or does every project have its own directories in there?
>
> And final, are you developing on your local machine with the
> development server or immedeatly at the server via ssh?
>
> If yes, how do you deploy your project and about what points do you
> have to concern while doing that?
>
> Anyway, is there any good documentation how good deployment on a
> server might look like?
>
> I know, a bunch of questions but answers would be very helpful for
> me.
>
> Thank you guys. :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to