Re: Streaming Video

2008-10-13 Thread Dan Ellis
There isn't really anything Django-specific here, although there might be helper apps. But take a look at FlowPlayer, which is a free, customisable Flash video player (I think it plays both FLV and H.264). For converting videos, ffmpeg is the thing, and a quick Google suggests there are at least

Re: Branching proj/myapp into branch/0.1/myapp breaks

2008-10-08 Thread Dan Ellis
On Oct 8, 11:22 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > They won't. Django is Python first and foremost. So modules must have > legal names. So what about all those Django apps with hyphens in their names? --~--~-~--~~~---~--~~ You received this

The User mess

2008-09-11 Thread Dan Ellis
First of all, congratulations to the team on reaching 1.0. It looks like a lot of good features landed in time. One thing that I still find messy, though, is the whole user/profile thing. Having separate models for users and profiles has a number of drawbacks: * extra DB hits * having to

Re: Root Access

2008-07-12 Thread Dan Ellis
The only thing you really /need/ root for is having some web server process (usually Apache or lighttpd, for example) bind to port 80. Everything else can be done without it. In fact, in any typical set up, once port 80 has been bound to you're not running as root any more anyway.

Re: URLS outside of the actual site but on the same domain

2008-07-10 Thread Dan Ellis
On Jul 10, 9:52 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > http://www.djangoproject.com/documentation/static_files/ This isn't going to work. A forum is a dynamic site, so some of it will be served by, for example, CGI. --~--~-~--~~~---~--~~ You received

Re: Not Django related, but would love your opinions

2008-07-10 Thread Dan Ellis
It is absolutely a legitimate concern. --~--~-~--~~~---~--~~ 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

Re: Copyright issues for an application developed using django, python and mySQL

2008-07-03 Thread Dan Ellis
There are no licensing issues with either Python or Django, which are both distributed under very liberal licenses (Python Software Foundation License and the BSD license respectively). http://www.python.org/psf/license/ http://www.opensource.org/licenses/PythonSoftFoundation.php

Django article on Digital Web Magazine

2008-04-25 Thread Dan Ellis
In response to a request on this mailing list, I recently wrote an introductory Django article for Digital Web Magazine. It's now online at http://www.digital-web.com/articles/intro_to_django_helping_perfectionists_with_deadlines/ Enjoy! --~--~-~--~~~---~--~~

Re: London Django User Group

2008-04-18 Thread Dan Ellis
I would be interested, but I'm in Cambridge so it's unlikely I'd attend every month. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: 'for' statements with five words should end in 'reversed': for key, value in obj.items

2008-04-18 Thread Dan Ellis
You can't do "key, value" in Django 0.96. You need to do "for item in obj.items" and then use item.0 and item.1, or use a development version. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Is middleware appropriate for this?

2008-04-11 Thread Dan Ellis
On Apr 11, 11:37 am, Panos Laganakos <[EMAIL PROTECTED]> wrote: > I'm wondering if working on a > middleware, `process_view` or something would be the right place to > make the conversion. Not a middleware, but a context processor.

Re: Dynamic Subdomain Generation for Users

2008-03-31 Thread Dan Ellis
Hi, Levi. I've just had a look through the code, and it appears you're in luck (at least in the trunk -- I haven't looked elsewhere). core/ handlers/base.py contains this line[1]: # Get urlconf from request object, if available. Otherwise use default urlconf = getattr(request,

Re: math in django

2008-03-27 Thread Dan Ellis
It's not possible to use aggregate functions in any Django release, but IIRC it is something that has been added in the queryset-refactor branch. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: How are you storing binary data in db

2008-03-27 Thread Dan Ellis
On Mar 27, 9:05 pm, Mike H <[EMAIL PROTECTED]> wrote: > Reading large > chunks of file data from a db just wastes db resources A recipe is unlikely to be a large chunk of file data. Pictures of food, sure, don't store those in the DB. Storing the text in the DB also means you can make use of

Re: How are you storing binary data in db

2008-03-27 Thread Dan Ellis
On Mar 27, 7:31 pm, shabda <[EMAIL PROTECTED]> wrote: > Considering that BlobField is not supported, what are you using to > store binary data. Recipes, snippets .. But these aren't binary data; they're text, so why not use a TextField? --~--~-~--~~~---~--~~ You

Re: moving django users to LDAP

2008-03-26 Thread Dan Ellis
On Mar 20, 7:44 pm, "Katz, Aryeh \(akatz\)" <[EMAIL PROTECTED]> wrote: > The downside of this method is that the user can still authenticate against > Django. I set my passwords in Django to something like 'get password from LDAP'. This is an invalid hash, so no one would ever be able to

Tracking state changes

2008-03-10 Thread Dan Ellis
I have an Alert model that has an AlertState field, and an AlertStateChange model that has fields for Alert, AlertState and a timestamp. I'd like to know the best way to create a report that has the average time between two given states. Currently, I have a custom save method in alert that create

Re: a Django TextMate theme

2008-01-04 Thread Dan Ellis
> If you're a TextMate user this greenish Django syntax highlighting > theme could interest you:http://www.tmthemes.com/theme/Django/ But a bit odd that they use what looks like Ruby code to demo it! --~--~-~--~~~---~--~~ You received this message because you are

Re: Default value for ForeignKey

2007-11-01 Thread Dan Ellis
On Nov 1, 2:55 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Set it in your model's save() method. I guess the point is that it's bad practice to hard-code magic values. Having thought about it some more, two options that spring to mind are: 1) Have a boolean 'default' field in the

Default value for ForeignKey

2007-10-31 Thread Dan Ellis
I have a model that contains a field, severity, that is a ForeignKey. When I create a new instance, I'd like that field to have the id of the Severity instance with the name 'Low'. What is the best way to do this? Putting default=1 in the model breaks encapsulation. I could manually set it to

Re: crititcal tidbit of documentation missing (instance vs. class attributes)

2007-10-25 Thread Dan Ellis
On Oct 25, 4:17 pm, bramble <[EMAIL PROTECTED]> wrote: > It would be trivial to just add a short sentence in the tutorial > saying something like, "Behind the scenes, Django sets things up such > that you automatically get instance variables for each of the class > variables you've set up.".

Re: crititcal tidbit of documentation missing (instance vs. class attributes)

2007-10-25 Thread Dan Ellis
Yeah, Django is doing some magic using a metaclass for Model (ModelBase, which is badly named IMO, as it isn't Model's base class). Most of the magic is in django.db.models.base. The documentation tells you how to /use/ the model API, though. I don't think there's any need for the docs to