Re: Do you use a skeleton for new django sites?

2009-06-03 Thread Andy Mikhailenko

I used to use a skeleton, but the problem was that I couldn't easily
upgrade the already "forked" projects to a newer version of the
skeleton; I had to manually backport all changed to each project.

The solution I finally adopted is to have a wrapper for site
configuration (settings and urls) as a separate application that can
be installed (and upgraded) globally. In manage.py I import that
wrapper, and _it_imports the actual site settings. The forkable
skeleton now only contains the slightly modified manage.py file and a
one-liner urls.py (which just imports some basic stuff from the
wrapper app).

My settings wrapper ("harness") is available online[1], see also the
skeleton directory[2] and an example site[3] which is essentially an
extended version of the skeleton.

That package is not intended for every website on earth, just for all
mine and some of yours. =)
It is possible that in the future django-harness will be split in two
parts: default settings (common for all my websites but irrelevant in
some cases) and the code that improves flexibility and portability
(relative SQLite DB path, serving of static content in debug mode,
overriding of some settings with non-versioned settings_local.py
files).

[1] http://bitbucket.org/neithere/django-harness/
[2] http://bitbucket.org/neithere/django-harness/src/tip/blank_site/
[3] http://bitbucket.org/neithere/django-harness/src/tip/example/

On Jun 2, 10:39 pm, Aaron Maxwell  wrote:
> Hi all,
>
> When creating a new django based website, my first step used to be to
> invoke "python manage.py startproject".  The files created would be the first
> or second commit into version control for that project.
>
> I found, however, that I would always make a similar set of changes right
> after: certain configurations and changes to settings, creating an apps
> directory (module), 404 and 500 templates, etc.
>
> So what I do now is I have a separate project, which I call django-skel, that
> is just a new project file layout with the changes I already want to make for
> every project.  For each new project, I just export from that, copy the files
> into the new project space, and commit.
>
> Over time, I'll discover something new I'll want to add to all my django
> sites.  So I just make that change to django-skel and forget about it.
>
> Does anyone else follow this technique?  Or do you have some different
> approach that solves this problem for you?
>
> Thanks,
> Aaron
>
> --
> Aaron Maxwellhttp://redsymbol.net/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Do you use a skeleton for new django sites?

2009-06-02 Thread Kenneth Gonsalves

On Tuesday 02 June 2009 22:09:03 Aaron Maxwell wrote:
> Over time, I'll discover something new I'll want to add to all my django
> sites.  So I just make that change to django-skel and forget about it.
>
> Does anyone else follow this technique?

yes - I have only used the startproject startapp thingie twice. Once in 2005 
and once when the structure changed dramatically after MR.
-- 
regards
kg
http://lawgon.livejournal.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Do you use a skeleton for new django sites?

2009-06-02 Thread Aaron Maxwell

Hi all,

When creating a new django based website, my first step used to be to 
invoke "python manage.py startproject".  The files created would be the first 
or second commit into version control for that project.

I found, however, that I would always make a similar set of changes right 
after: certain configurations and changes to settings, creating an apps 
directory (module), 404 and 500 templates, etc. 

So what I do now is I have a separate project, which I call django-skel, that 
is just a new project file layout with the changes I already want to make for 
every project.  For each new project, I just export from that, copy the files 
into the new project space, and commit.

Over time, I'll discover something new I'll want to add to all my django 
sites.  So I just make that change to django-skel and forget about it.

Does anyone else follow this technique?  Or do you have some different 
approach that solves this problem for you?

Thanks,
Aaron

-- 
Aaron Maxwell
http://redsymbol.net/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---