Best Practices to Make your Apps Portable

429 views
Skip to first unread message

Sebastian Macias

unread,
Jul 24, 2007, 7:41:47 PM7/24/07
to Django developers
I posted this on django-users so I won't post the same here but I
thought the actual framework developers might have excellent feedback
on this.

This is just an invitation to participate in django-users thread. I'm
sure this will be very useful to many people moving to django from
ruby on rails and php mvc frameworks.

The thread is here:

http://groups.google.com/group/django-users/browse_thread/thread/ab9e4730b092b81d/4654839cd9615d9b#4654839cd9615d9b

Thanks,

Sebastian Macias
digital-telepathy inc.

Simon G.

unread,
Jul 24, 2007, 8:13:55 PM7/24/07
to Django developers
There is a wiki page on this sort of thing:
http://code.djangoproject.com/wiki/DosAndDontsForApplicationWriters

...but it hasn't been updated in a while. If anyone comes up with
useful things, could you (or them) update that page?

Thanks,
Simon

On Jul 25, 11:41 am, Sebastian Macias <sebast...@sebastianmacias.com>
wrote:


> I posted this on django-users so I won't post the same here but I
> thought the actual framework developers might have excellent feedback
> on this.
>
> This is just an invitation to participate in django-users thread. I'm
> sure this will be very useful to many people moving to django from
> ruby on rails and php mvc frameworks.
>
> The thread is here:
>

> http://groups.google.com/group/django-users/browse_thread/thread/ab9e...

Sebastian Macias

unread,
Jul 25, 2007, 2:19:50 PM7/25/07
to Django developers
I just came up with a setup that works perfectly for me as it allows
me to work on project specific apps as well as on portable apps
efficiently.

The setup is here:

http://groups.google.com/group/django-users/browse_thread/thread/ab9e4730b092b81d/419ddcc572954ff8#419ddcc572954ff8

I want to add it to the wiki but I'm not sure if the page you posted
is the most appropriated.

Any suggestions?

Sebastian Macias

Sebastian Macias

unread,
Jul 27, 2007, 1:47:38 PM7/27/07
to Django developers
I just added it to the wiki:

http://code.djangoproject.com/wiki/BestPracticesToWorkWith3rdPartyAppsAndMakingYoursPortable

It's also available via the resources page.

http://code.djangoproject.com/wiki/DjangoResources

Best,

Sebastian Macias

On Jul 25, 11:19 am, Sebastian Macias <sebast...@sebastianmacias.com>
wrote:


> I just came up with a setup that works perfectly for me as it allows
> me to work on project specific apps as well as on portable apps
> efficiently.
>
> The setup is here:
>

> http://groups.google.com/group/django-users/browse_thread/thread/ab9e...

Gary Wilson

unread,
Jul 27, 2007, 4:39:12 PM7/27/07
to Django developers
On Jul 27, 12:47 pm, Sebastian Macias <sebast...@sebastianmacias.com>
wrote:

> I just added it to the wiki:
>
> http://code.djangoproject.com/wiki/BestPracticesToWorkWith3rdPartyApp...

I don't think you meant to have the exact same directory structure for
a django project as you did for 3rd party apps, did you?

Gary

Sebastian Macias

unread,
Jul 28, 2007, 2:35:09 AM7/28/07
to Django developers
That was a typo I actually just fixed.

http://code.djangoproject.com/wiki/BestPracticesToWorkWith3rdPartyAppsAndMakingYoursPortable

Thanks for letting me know,

Sebastian

Tai Lee

unread,
Jul 28, 2007, 5:22:30 AM7/28/07
to Django developers
Why do you need a shared project to house generic apps? Why not just
put them at dango_root (or anywhere on your python path), and install
them in your django projects (sites)?

django_root/
genericapp1/
genericapp2/
mysite/
__init__.py
apps/
__init__.py
siteapp1/
siteapp2/
manage.py
settings.py
urls.py

I also put default templates with the apps, and override them with
project templates if need be.

If you work with several django sites, it may be desirable to have
each use their own private copies of django and generic apps, so that
individual sites can be upgraded without worrying about backwards
incompatible changes in django or generic apps. I do this with
Subversion externals.

trunk/
django/
genericapp1/
genericapp2/
mysite/
django/ (X)
genericapp1/ (X)
genericapp2/ (X)
mysite/
__init__.py
apps/
__init__.py
siteapp1/
siteapp2/
manage.py
settings.py
urls.py

All you need to do is set the python path to root/mysite/ for your dev/
production server or interactive shell. I do that with shell aliases/
scripts. Then you can still work on your generic apps within mysite,
and commit those changes directly back to the trunk version to be
utilised by other projects that track trunk, or new projects.

Simon G.

unread,
Jul 28, 2007, 5:55:27 AM7/28/07
to Django developers
Excellent, thanks!

--Simon

On Jul 28, 5:47 am, Sebastian Macias <sebast...@sebastianmacias.com>
wrote:


> I just added it to the wiki:
>

> http://code.djangoproject.com/wiki/BestPracticesToWorkWith3rdPartyApp...

Reply all
Reply to author
Forward
0 new messages