Re: Does anybody solved the django project distribution problem?

2006-10-05 Thread [EMAIL PROTECTED]

I've used something like this before (in urls.py), which uses the
runserver to set it up (non-threaded of course, but it's not too much
of a problem for a single user on localhost):

# Serve files
# - if file_server is None, then we get Django to try to do
#   it out of /files  anyone using this on a production
#   website should be beaten. Use a lightweight
#   fileserver ( Zeus, thttpd, lighthttpd, or an optimised
#   Apache ) instead.
if settings.MNEMOSYNE_SETTINGS['file_server'] == None:
urlpatterns += patterns('',
( r'^files/(?P.*)', 'django.views.static.serve',
{   'document_root': settings.MNEMOSYNE_SETTINGS['filepath'],
'show_indexes':True } ),
)

I've also used SimpleHTTPServer to do this on a different port.

Neither of which are the most elegant of solutions, but they work...

--Simon

Rob Hudson wrote:
> One thing I did realize is the static media would still need to be
> served.  That would preferably happen with a light weight web server
> with threaded support.  I think there's lot of options there (twisted,
> lighttpd, others).  That also means opening 2 ports... one for Django
> and one for the media server.
>
> I don't know... is it possible to serve static files with the built-in
> WSGI web server in Django?  Even if it is, I don't believe the built-in
> server is multi-threaded.
> 
> -Rob


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Does anybody solved the django project distribution problem?

2006-10-05 Thread Rob Hudson

I haven't solved the problem.  For now it's on the back burner.  We'll
need to find a solution to this eventually.  As a fall back we can
always wrap up our Django app in an installer (NSIS) and launch it
locally.  But it would be super nice if it were as simple as a py2app
or py2exe solution.

One thing I did realize is the static media would still need to be
served.  That would preferably happen with a light weight web server
with threaded support.  I think there's lot of options there (twisted,
lighttpd, others).  That also means opening 2 ports... one for Django
and one for the media server.

I don't know... is it possible to serve static files with the built-in
WSGI web server in Django?  Even if it is, I don't believe the built-in
server is multi-threaded.

-Rob


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Does anybody solved the django project distribution problem?

2006-10-05 Thread ian

[EMAIL PROTECTED] wrote:
> i find this thread from Rob:
> Distribute Django program to run on a local computer
> http://groups.google.com/group/django-users/browse_thread/thread/609f539387ba8296/a3ff0fc87da20bed
> 
> i m trying to do the same thing.but the thread end with no result.
Ola,
You could package your django app into a deb [see a previous post] and
include it in a Linux Live CD. The advantage of this is that you can
customise everything, the usplash image,desktop,apps and so on. If you
want to go the Linux custom Live-CD there are some new resources available.
http://reconstructor.aperantis.com/index.php?option=com_frontpage=1
is a completely GUI way of doing this and has support for the latest
bleeding edge ubuntu (Edgy 6.10 Live CD) and is the best I have found in
creating an .iso
This:
http://lichota.net/%7Ekrzysiek/projects/ubuntu-livecd-customization/
is also a GUI based tool.

If you feel like getting your hands dirty on the command line with
mksquashfs,chroot and so on have a look at:
https://help.ubuntu.com/community/LiveCDCustomization/6%2e06
http://www.atworkonline.it/~bibe/ubuntu/custom-livecd.htm

On Windows/Mac i dunno but I am sure you could buy something to
do the same thing.
HTH
[]'s

-- 
Ian Lawrence
Centre for Bioinformatics
INSTITUTO NACIONAL DE PESQUISAS DA AMAZÔNIA-INPA
RUA ANDRÉ ARAÚJO N º .2936 , BAIRRO DO ALEIXO
MANAUS-AMAZONAS-BRAZIL
Research Program in Biodiversity
http://ppbio.inpa.gov.br
PHONE: 055-92-3643-3358
CEP. 69011 -970

| Please do not send me documents in a closed
| format.(*.doc,*.xls,*.ppt)
| Use the open alternatives. (*.pdf,*.html,*.txt)
http://www.gnu.org/philosophy/no-word-attachments.html

"We are all in the gutter, but some of us are looking at the stars."

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---