Re: Spawning long processes

2007-07-05 Thread Oliver Charles
at OS are you using, and have you verified > that the code you are uring works outside of django (write a small > shell script that does nothing but call the external torrent process - > does that work as expected?). > > -Simon. > > > > > On Jul 5, 2:57 pm, Simon Drabbl

Re: Spawning long processes

2007-07-05 Thread Oliver Charles
Drabble <[EMAIL PROTECTED]> wrote: > On Thu, 5 Jul 2007, Oliver Charles wrote: > > > Just to give an update, I've tried forking the view, and then turning > > the child process into a daemon with a double fork, and then exiting > > before it gets to the return, and le

Re: Spawning long processes

2007-07-05 Thread Oliver Charles
a specific controller daemon (but guess I'm going to have to) - Olllie On Jul 5, 2:58 am, Oliver Charles <[EMAIL PROTECTED]> wrote: > Hi > > I'm currently playing around trying to make something akin to > TorrentFlux, using Django. TorrentFlux is a system that's PHP and it >

Spawning long processes

2007-07-04 Thread Oliver Charles
Hi I'm currently playing around trying to make something akin to TorrentFlux, using Django. TorrentFlux is a system that's PHP and it calls shell scripts to download torrents in the background, with a web interface to control them. For every torrent download, a new process is started, which runs

Re: get the latest # of objects

2007-04-22 Thread Oliver Charles
Try Entries.objects.order_by('a_field_that_you_want_to_order_by')[:5] Entries.objects is a query set manager, not a query set, so you can't slice that. -- Ollie > hm. I'm trying to do this in a context processor and its not working: > > def entry_latest(request): > from app.entries.models

Re: Another take on auto-history

2007-04-22 Thread Oliver Charles
app as well. -- Ollie > Looks like the download link is broken. > > On Apr 21, 4:24 am, Oliver Charles <[EMAIL PROTECTED]> wrote: > >> Morning all >> >> I've been meaning to post this to the list for a while, and I think my >> code is now ready to

Re: reverse relationships with ForeignKey?

2007-04-21 Thread Oliver Charles
Thats' because by default Django will name the field "model_set" on the reverse relationship. So if you want to access it that way, you should do entry.updates_set.all(). A nicer, more readable way, is to set related_name on the ForeignKey. E.g: entry = models.ForeignKey(Entry,

Another take on auto-history

2007-04-21 Thread Oliver Charles
this, I'd love to hear them. Thanks, hope someone finds it useful! -- Oliver Charles --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: how to connect Django to objects served over xml-rpc?

2007-04-21 Thread Oliver Charles
Hey, seeing as you haven't had any relies yet, I will through my idea down. What I think you're gonna have to do for the most graceful version is to create your own database wrapper, that calls xml-rpc, instead of an actual database. Then Django *should* be free to use. The problem may occur

Re: Django Urls object_id/xxxxxx/object_id

2007-04-20 Thread Oliver Charles
Just write your own view that in turn calls a generic view? Create a new view, with a similiar signiture, but change the object_id for team_id AND result_id. Then, do a bit of logic to find the query set you need a view of, and pass this through to a generic view, and then return this. Hope

Re: multiple urls for the same view?

2007-04-20 Thread Oliver Charles
from a setting or something... > > On Apr 20, 10:53 am, Oliver Charles <[EMAIL PROTECTED]> wrote: > >> Yea, there is a way. If you take all your url out, and move them into an >> appurls.py file or something, >> you can include this from the main urlpatterns. E.g:

Re: multiple urls for the same view?

2007-04-20 Thread Oliver Charles
Yea, there is a way. If you take all your url out, and move them into an appurls.py file or something, you can include this from the main urlpatterns. E.g: urlpatterns = ('', ('^yourprefixhere/', include('pythonpathtoproject.appurls')) I think that should work - there might be other ways

Re: Django Schema Migration

2007-04-20 Thread Oliver Charles
Hey, this is neat! It's just a shame that it doesn't use Python models or some type of database agnostic representation - any plans there? Great work non the less though! -- Ollie > Hi all, > > Release 0.01 of the migration module can be downloaded from > http://www.aswmc.com/dbmigration/ >

Re: Extending the User model

2007-04-19 Thread Oliver Charles
I suppose the best bet, in an ideal world, world be model inheritance. As you're probably aware, this is incomplete at the moment, so you can't really do that. A better solution may be to have a wrapper model, and have your Buyer/Seller classes create one to one relationship this extension class.

Re: ImportError: no module named django

2007-04-18 Thread Oliver Charles
information, so I have made this private with: chmod 0750 /whatever/settings.py chown root:apache /whatever/settings.py Now it's read/write/execute for root, and only read/execute for apache. Hurrah! Big thanks to Rob for helping me get this fixed! - Oliver Charles On Apr 18, 10:10 pm, Oliver

Re: ImportError: no module named django

2007-04-18 Thread Oliver Charles
D]> wrote: > What happens when you run: > sudo -u apache python>>> import django > >>> django > > __init__.pyc'> > > BTW, I use openhosting and have a few django sites running so don't be > discouraged! > > -rob > > On Apr 18, 12:59 pm,

ImportError: no module named django

2007-04-18 Thread Oliver Charles
): ImportError: No module named django I can't see for the life of me why this is happening. Django is readable everywhere, python can import is from the shell, and sys.path contains a django directory, with __init__.py... Can anyone see why I c

Extending feeds with Apple iTunes information?

2007-02-16 Thread Oliver Charles
I'm using the feed system to do a podcast, and it's up on the iTunes Store as well. But I'd like to make it more user friendly, taking advantage of the images that are supported, and extended meta data. Is there anyway to add my own namespaces into the feeds, or am I going to have to get my hands