Validator for overlapping time intervals?

2005-09-12 Thread Sokolov Yura
I have following (repeating) table structure: value=meta.TextField() (for example) time_from=meta.DateTimeField() time_to=meta.DateTimeField() How can I make a validator (called at object change or addition by generic views) to check that there isn't any other object, having: this.v

Re: Validator for overlapping time intervals?

2005-09-12 Thread Vladimir Labath
did you think about it get_list(  this.value_eq=other.value,  this.time_from_lt=other.time_to, this.time_to_gt=other.time_from) ? On 9/12/05, Sokolov Yura <[EMAIL PROTECTED]> wrote: I have following (repeating) table structure:value=meta.TextField() (for example)time_from=meta.DateTimeField

Re: Validator for overlapping time intervals?

2005-09-12 Thread Sokolov Yura
where is the place I ought to insert this statement for automatic checking in general views? Fields has option 'validator_list', which has no enough documentation. I looked at source of django and saw that validator, which should check the whole table or other tables (like ForeingKey and Unique) o

svn access to django_website

2005-09-12 Thread tonemcd
Hi, I've tried to check out the django project website using this; % svn co http://code.djangoproject.com/svn/djangoproject.com/django_website/django_website/ And I get this... subversion/libsvn_ra_dav/util.c:780: (apr_err=175002) svn: PROPFIND request failed on '/svn/djangoproject.com/django_w

Re: svn access to django_website

2005-09-12 Thread Vladimir Labath
try %svn upOn 9/12/05, tonemcd <[EMAIL PROTECTED]> wrote: Hi,I've tried to check out the django project website using this;% svn cohttp://code.djangoproject.com/svn/djangoproject.com/django_website/django_website/ And I get this...subversion/libsvn_ra_dav/util.c:780: (apr_err=175002)svn: PROPFIND r

Re: Validator for overlapping time intervals?

2005-09-12 Thread Vladimir Labath
did you tried tutorial? all parts, very slowly, step by step?On 9/12/05, Sokolov Yura <[EMAIL PROTECTED] > wrote:where is the place I ought to insert this statement for automaticchecking in general views? Fields has option 'validator_list', which has no enough documentation.I looked at source of dj

Many-to-many relationships

2005-09-12 Thread stane
If I have declare explicitly primary keys ex. article_id and publication_id then p1.get_article_list() fails Traceback (most recent call last): File "", line 1, in ? File "C:\Python23\lib\site-packages\django\utils\functional.py", line 3, in _curried return args[0](*(args[1:]+moreargs), **dict(kw

Re: Validator for overlapping time intervals?

2005-09-12 Thread Jacob Kaplan-Moss
On Sep 12, 2005, at 6:37 AM, Sokolov Yura wrote: I have following (repeating) table structure: value=meta.TextField() (for example) time_from=meta.DateTimeField() time_to=meta.DateTimeField() How can I make a validator (called at object change or addition by generic views) to check t

psycopg - PostGreSQL libraries (not) missing

2005-09-12 Thread bayerj
Hello, I know that this is a django group but due to the fact that everybody here must- at one point - have installed psycopg and on that nobody answers me on the psycopg list, i'm asking here again. ;) I am running: - Mac OS X 10.4 - Python 2.3.5 (shipped with Mac OS X) - PostgreSQL 7.4.3 via D

Re: Validator for overlapping time intervals?

2005-09-12 Thread Sokolov Yura
YES. When you use only object_list and object_detail generics there no problems. But it does not conform DRY principe. I wish to use create_object, update_object and delete_object generics. And I wish write one simple (or complex) validator (or generator of validators), which I could use with many

Re: psycopg - PostGreSQL libraries (not) missing

2005-09-12 Thread Sokolov Yura
May by -with-postgres-libraries=/opt/local/lib/postgresql Or-with-postgres-libraries=/opt/local/lib And why not using psycopg2? It is beta, but i not has a proplem with it. Just edit django's postgresql module to import psycopg2 and comment register-type (psycopg2 use datetime.datetime

Re: Validator for overlapping time intervals?

2005-09-12 Thread Jacob Kaplan-Moss
On Sep 12, 2005, at 9:32 AM, Sokolov Yura wrote: YES. When you use only object_list and object_detail generics there no problems. But it does not conform DRY principe. Huh? The entire point of generics is DRY... I'm not sure I follow. I wish to use create_object, update_object and delete_ob

Re: User Authentication - What's the best way?

2005-09-12 Thread [EMAIL PROTECTED]
That's all fine and well, and sure, it's not hard to figure out. But it's an interim solution, not the official, documented Django way. I'd like to do it the "official" way, so I don't end up overhauling my authentication scheme several weeks into production deployment. I'm also hoping a halfwa

Re: Validator for overlapping time intervals?

2005-09-12 Thread Sokolov Yura
Yes, that's right! I want to validate that no two objects have the same "value" and _overlapping_ time intervals. Where is definitive place of object's validators, used by generic views create_object, update_object and delete_object?

Re: Validator for overlapping time intervals?

2005-09-12 Thread Sokolov Yura
Ok I see. _manipulator_validate_ is some valid place (is this right?) How can I get a module from self? Just give me this method and I will be happy :-) (I am too lazy to search it at the moment :-) And structure of all_data parameter? It is not documented. Documentation update is welcome ;-) Sorr

Re: Validator for overlapping time intervals?

2005-09-12 Thread Jacob Kaplan-Moss
On Sep 12, 2005, at 11:15 AM, Sokolov Yura wrote: Ok I see. _manipulator_validate_ is some valid place (is this right?) How can I get a module from self? Just give me this method and I will be happy :-) (I am too lazy to search it at the moment :-) Well, I'm too busy to spell it all out for yo

Re: Validator for overlapping time intervals?

2005-09-12 Thread Sokolov Yura
Thank you.

wysiwyg editor

2005-09-12 Thread Mookai
Hi, I think it is user friendly to have a wysiwyg editor for large text area's in a site. But I could use some pointers if any available how I could accomplish this in the auto generated admin pages. I could use a filter (markdown, textile), but that isn't close to a wysiwyg editor. Greetz,

Re: wysiwyg editor

2005-09-12 Thread Sebastien Fievet
Hi, if you want a templating language editable in a WYSIWYG editor, take a look at DjangoPageTemplate (http://www.zope.org/Members/shh/DjangoPageTemplates/1.0.0/readme.txt) It's an implementation to use TAL, TALES, and METAL template system with Django. Hope it helps.

Re: wysiwyg editor

2005-09-12 Thread [EMAIL PROTECTED]
I wrote two quick howto's on integrating existing wysiwyg interfaces with Django TinyMCE http://www.socialistsoftware.com/?p=8 Xinha http://www.socialistsoftware.com/?p=10 It is pretty easy to figure out for just about any javascript wysiwyg interface you might find.

Re: wysiwyg editor

2005-09-12 Thread Eugene Lazutkin
Mookai, I use TinyMCE (http://tinymce.moxiecode.com/). It's not without quirks but it is useable. You should include js in your model like that: class META: admin = meta.Admin( ... your admin parameters ... js = ( '/tiny_mce/tiny_mce.js', <--

RSS quick start

2005-09-12 Thread Andreas Neumeier
Hi there, is there a RSS tutorial around? I tried reading the djangoproject.com code and tried to imlement that, but did not get it working anyhow. Propably, I forgot some detail. my main_rss.py basically looks like that: --- from django.core import rss from django.models.app import model rss

Request data accesible to _pre_save??

2005-09-12 Thread Alberto Valverde
Firts of all, great software that's been keeping nearly without sleep for 3 days :) I'm building my first app with django and I'm stuck at one point: I want to be able to store de current user (the one that's logged in the admin area) in an object as a 'created_by' field. I thought about doing i

FileUploadField in an AddManipulator

2005-09-12 Thread Brant Harris
How in the world do you get the file content? I have a manipulator that looks like this: class AddManipulator(formfields.Manipulator): def __init__(self): self.fields = ( formfields.TextField(field_name="title", length=30,

Re: FileUploadField in an AddManipulator

2005-09-12 Thread Jacob Kaplan-Moss
On Sep 12, 2005, at 3:55 PM, Brant Harris wrote: Finally I hacked the render of FileUploadField to add enctype="multipart/form-data" to the INPUT field, but still nothing... The enctype business needs to be on the tag. Jacob

Re: Request data accesible to _pre_save??

2005-09-12 Thread Jacob Kaplan-Moss
On Sep 12, 2005, at 3:40 PM, Alberto Valverde wrote: Firts of all, great software that's been keeping nearly without sleep for 3 days :) I'm building my first app with django and I'm stuck at one point: I want to be able to store de current user (the one that's logged in the admin area) in an

django in a production environment

2005-09-12 Thread [EMAIL PROTECTED]
I am getting ready to deploy my first real production django web site for a customer and I was wondering what people had to say about mod_python vs fcgi. I have the impression that using mod_python is the prefered way. Is this because of speed? Or are there other reasons why fcgi is not desirab

Re: Packaging django apps

2005-09-12 Thread [EMAIL PROTECTED]
What if we, the community, created our own site. djangoapps.com or something. It would allow people to upload there own django apps. People could rate and comment on the apps posted there. And it would of course be written using django.

Re: RSS quick start

2005-09-12 Thread Adrian Holovaty
On 9/12/05, Andreas Neumeier <[EMAIL PROTECTED]> wrote: > is there a RSS tutorial around? > > I tried reading the djangoproject.com code and tried to imlement that, > but did not get it working anyhow. Propably, I forgot some detail. Don't forget to add the "/rss/" handler to your urlconf... Ad

Re: Many-to-many relationships

2005-09-12 Thread Adrian Holovaty
On 9/12/05, stane <[EMAIL PROTECTED]> wrote: > If I have declare explicitly primary keys ex. article_id and > publication_id then p1.get_article_list() fails > > Traceback (most recent call last): > File "", line 1, in ? > File "C:\Python23\lib\site-packages\django\utils\functional.py", line > 3,

Re: psycopg - PostGreSQL libraries (not) missing

2005-09-12 Thread bayerj
I have tried a lot of different paths, but neither is working. I'm going to have a look into psycopg2, though.

Re: django in a production environment

2005-09-12 Thread Jason F. McBrayer
On Tue, 2005-09-13 at 02:00 +, [EMAIL PROTECTED] wrote: > I am getting ready to deploy my first real production django web site > for a customer and I was wondering what people had to say about > mod_python vs fcgi. I have the impression that using mod_python is the > prefered way. Is this b