Jason, I for one don't understand what you mean by
domain-specific-objects. Can you enlighten us a little, maybe I'm not
the only one.
The idea is you have to integrate your application with Pinax. Pinax
has established some conventions that work in 20+ apps, but if you
develop something then you have to make it Pinax compatible so it will
work like the other apps.
Hope this helps,
--
Milan
> Jason, I for one don't understand what you mean by
> domain-specific-objects. Can you enlighten us a little, maybe I'm not
> the only one.
It's a phrase used by James in his presentation at Djangocon to
describe the specific thing that you're socially-networking about.
For instance, for Quisition, it's flashcards. It's the layer that you
put on top of Pinax.
> The idea is you have to integrate your application with Pinax. Pinax
> has established some conventions that work in 20+ apps, but if you
> develop something then you have to make it Pinax compatible so it will
> work like the other apps.
This may be what I'm trying to do, although it doesn't feel right. Is
there any actual description anywhere of these conventions? What I've
seen so far is folks saying that there are some, but never quite what
they are. I may be looking in the wrong place.
Thanks,
Jason
At this point in time the conventions are in the code. ;) So you have
to find another app to prototype your app from. I think wikiapp is
pretty well designed, but that's just my opinion. I'd recommend
taking a look at the popular apps and making a judgment call on which
one looks most mature. Then model your app after that.
Pinax is under heavy development at the moment, especially with all
the changes from Django 1.0. So the best way to get answers at the
moment is the IRC channels; #pinax and #django-hotclub.
--
Milan
>
>> Where in the folder structure should one put their own additional
>> apps
>> where it won't get in the way of the rest of the internal and
>> external
>> apps in the SVN repository?
>
> Actually, let me clarify that a bit more. I know applications can
> live anywhere, but what do people tend to do when working with Pinax?
> Not only in regards to their own apps, but also media and templates?
> I know all of those things can live anywhere, but it's nice to have
> all the files for a site live in or near the same area on the
> filesystem.
For cloud27 we just have our own project containing urls.py,
settings.py, site_media and templates and don't use the 'pinax'
directory. Everything else we use exactly as is.
James
I would probably put it in the pinax/ directory unless it's a
"standalone" or "pluggable" app. From what I gather Pinax is just a
Django project and thusly can be composed simply of a settings.py and
urls.py file. Pinax aims to be that simple one day. The apps that
are still inside of pinax/ are still in the "incubator" as some have
termed it.
I don't see anything wrong with putting your own apps that you are
working on in pinax/ until they are ready to live in their own
separate apps directory/custom site-packages folder. I just had a peak
and that's what these docs (fresh off the presses) suggests, so I may
have guessed right.
http://pinaxproject.com/docs/customization.html
I had a related post last week as well which might prove useful,
relating to template and media dirs.
Also, this doc seems helpful for working on new applications:
http://code.djangoproject.com/wiki/DosAndDontsForApplicationWriters
The developers are still working on documentation and breathing life
into Pinax, part of that is developing formalized conventions, which
have yet to fully emerge.
Hope this helps,
Milan
Trey,
Definitely keep it out of your public_html directory. Something like:
/home/<username>/sites/<domain.name>/libs/django-hotclub/
/home/<username>/sites/<domain.name>/logs/
/home/<username>/sites/<domain.name>/etc/
/home/<username>/sites/<domain.name>/uploads/
...
Then there's several ways to deal with the libs/ directory so all the
apps and pinax are on your python path. Take your pick. If you use
the mod_wsgi deploy script from the pinax/deploy/pinax.wsgi then your
paths get setup with modifications to sys.path.
http://code.google.com/p/django-hotclub/source/browse/trunk/pinax/deploy/pinax.wsgi
--
Milan
OK, that example was a little confusing. In my setup (based on the
wisdom of the guides on articles.slicehost.com), all of my sites live
in /home/username/public_html/, but the VirtualHost information for
each site is configured to point to
/home/username/public_html/<domain.name>/public/ or similar (with
other folders adjacent to public/ such as log/). So I'm not actually
talking about putting the Django project in the DocumentRoot or
anything foolish like that.
That being said, are you saying that once I make a copy of the
django-hotclub/pinax folder to use for my own project, it should live
in
/home/<username>/sites/<domain.name>/libs/django-hotclub/my_django_project_copied_from_the_pinax_folder
?
Man, it's easy for me to get hung up on these kinds of details! :)
Thanks for your patience.
-Trey
There's not actually much under that directory -- only starter
templates and icons and CSS under site_media. If you're building your
own site you'd want to modify those anyway. All the reusable code is
under separate directories.
James
Don't copy settings.py to localsettings.py
Just use localsettings.py to override settings.py with stuff that is
environment-specific
For example, database, email server info, timezone
James
One minor thing you might want to change is
From:
cp settings.py localsettings.py
To:
echo "ROOT_URLCONF = '[name_of_project].urls'" > localsettings.py
You don't need to copy all of settings.py to localsettings.py ... just
specify the overrides. Similarly other settings would get modified.
The localsettings trick is one that makes the production/development
switch easier as well. Typically localsettings.py does not going into
your repo, while settings.py does.
Otherwise looks grand.
I have a django bootstrap script that I could see modifying to work
with Pinax/mod_wsgi someday.
http://snipplr.com/view/5786/bootstrap-a-django-fastcgi-setup/
(Just saw James' post come through, I'll post this anyway since
there's a couple additional tips.)
--
Milan
http://github.com/justinlilly/webdev_boilerplate/tree/master
I would welcome any input on what needs to be done to make it pinax compatible.
-justin
--
Justin Lilly
Web Developer/Designer
http://justinlilly.com
Very cool. Thanks for the feedback, guys! I've updated the post with that.
BTW, it's cool that you're using Snipplr--I actually work at the
company that does that site.
-Trey