On 8/9/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On 10-Aug-06, at 12:43 AM, Robin Gruyters wrote:
>
> > My hosting provider doesn't give shell access, so I can't execute like
> > "syncdb", "startapp", "startproject", etc.
> >
> > Is there another way to do this? (e.g. by creating a runsync.py
> > script?! (or
> > something?))
>
> short answer - without shell access, django programming is going to
> be a major pita. Long answer - you can create everything, directory
> structure etc etc offline on your dev machine and upload it to your
> production machine (too much to expect svn on that?). You could also
> pipe the sqlall to a file and create a script to initialise/update
> your database which you can run using phppgadmin or whatever.
> Ideally, if there is some way you could use svn on your production
> machine, you could do everything on your local machine and just svn
> up whenever you want changes. Even creating a superuser can be done
> by creating an sql script offline.
>

My hosting provider doesn't offer shell access, and I run Django for
my personal site.  I did what's mentioned above -- built the site
initially on my own box, uploaded files via ftp, loaded the initial
mysql via phpmyadmin.  For the stuff I really needed to run via shell,
I did something like:

import os
import commands

os.chdir('/dir/on/srv')
out = commands.getoutput("some command")

print 'Content-type: text/plain\r\n'
print out

I ran this as cgi and could run commands as needed and see their
output.  Like Kenneth says, not ideal for serious development, but for
a personal site it's not bad.  And now that it's up, I do everything
through the Django admin anyway.

It's hackish, but it works.  Just an idea...

Cheers,
deryck

-- 
Deryck Hodge                            http://www.devurandom.org/
Web Developer, Naples News     http://www.naplesnews.com/
Samba Team                                    http://www.samba.org/

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to