Re: SetEnv issue

2006-02-22 Thread Amit Upadhyay
Hi Kenneth,Are you using VirtualHosts? I had problem with them on some machine, and I moved to someother without virtual hosts and it worked. On 2/23/06, Kenneth Kalmer <[EMAIL PROTECTED]> wrote: GuysI've scoured google, this list and the docs for two days now and Isimply can't get django to work

Re: weekend datetime objects

2006-02-22 Thread Russell Cloran
Hi, On Wed, 2006-02-22 at 19:12 -0800, Luke Skibinski Holt wrote: > dt = datetime.now() > dt.replace(day=28, month=2) > wd = dt.weekday() > sat = dt.replace(day=dt.day+(5-wd)) > sun = dt.replace(day=dt.day+(6-wd)) >>> from datetime import datetime, timedelta >>> dt = datetime(2006, 2, 28) >>> wd

Re: weekend datetime objects

2006-02-22 Thread Malcolm Tredinnick
On Wed, 2006-02-22 at 19:12 -0800, Luke Skibinski Holt wrote: > Is there a means of getting a datetime object as an offset from the > current date? > I need to get the datetime objects for the coming weekend, but if my > result is greater than the number of days in a month it fails rather > than w

Re: SetEnv issue

2006-02-22 Thread Kenneth Gonsalves
On Thursday 23 Feb 2006 7:00 am, Kenneth Kalmer wrote: > Playing around I got to this point now where I have the following > code in a .htaccess file > > <.htaccess> > SetEnv DJANGO_SETTINGS_MODULE myproject.settings > SetEnv foo bar > AddHandler mod_python .py > PythonHandler mptest > PythonAutoR

Django Attribute Error on Page Load

2006-02-22 Thread [EMAIL PROTECTED]
Hi, I'm new to django and it looks really cool. I've installed mod_python and am trying to get the tutorial to work. It seems to work for the most part but whenever I am trying to load a page I get the following error message, after I hit refresh the page loads properly, for a little while and

weekend datetime objects

2006-02-22 Thread Luke Skibinski Holt
Is there a means of getting a datetime object as an offset from the current date? I need to get the datetime objects for the coming weekend, but if my result is greater than the number of days in a month it fails rather than wrapping into the next month. mx.DateTime and datetime.datetime don't see

regular error "duplicate key violates unique constraint"

2006-02-22 Thread Luke Skibinski Holt
I've gotten these type of problems before and they fix themselves after 5-10mins - which is very frustrating because I can't seem to find a cause. The insert SQL is good and the primary key should be a serial and not be conflicting with anything - so I cannot divine the problem here. Has anybody e

Re: OneToOneField and its usage

2006-02-22 Thread [EMAIL PROTECTED]
title = meta.OneToOneField(Title, core=True) ... # works but nothing displays should be #installs and doesn't complain but no sub fields display # AND I feel this is due to the fact that the ill formed SQL query string in the next example isn't executed [EMAIL PROTECTED] wrote: > Hi All, > > Bee

OneToOneField and its usage

2006-02-22 Thread [EMAIL PROTECTED]
Hi All, Been having problems solving a model problem and it may or may not be due to Django shortcomings. I would like to have multiple objects(/models/classes) where one is a 'master' or generic object and all others are one to one mappings to this master. From this I would like to selectively e

SetEnv issue

2006-02-22 Thread Kenneth Kalmer
Guys I've scoured google, this list and the docs for two days now and I simply can't get django to work with mod_python. Here is some detail first: httpd-2.0.52-22.ent.centos4 python-2.3.4-14.1 mod_python-3.1.3-5.1 MySQL-python-1.0.0-1.RHEL4.1 This is a seperate httpd instance to the one with P

Re: django on mod_python - again...

2006-02-22 Thread iGL
Hi Malcolm, Yes, there's empty output. AFAIK, mod_python's PythonDebug On should redirect uncaugth exceptions onto a browser. Anyway, there's nothing in the error log. On another hand, if I intentionally make an error in urls.py, nice error message is displayed. But, if I make errors in views o

Re: django on mod_python - again...

2006-02-22 Thread Malcolm Tredinnick
On Wed, 2006-02-22 at 22:51 +, iGL wrote: > Hi, > My hosting provider is planning to provide django support. I > volunteered to beta test it. > Things are mainly ok, however, when I tried to deploy > http://source.socialistsoftware.com/sssource/ by Jay Graves, I, all of > a sudden, encountered

Re: how to implement RequiredIfOtherFieldEquals validation?

2006-02-22 Thread gizo
okay. Sorry to waste your time. Firstly: I had a bad day yesterday, my head was very hurt. Secondly: choices_list=(('by Month','Month'),('by Day','Day')) - no wonder it didn't work!! I apologise to anyone who has bothered to read this, and even more to anyone who might have stopped to think abo

Re: How to implement this fucntionality ? (current page higlighting)

2006-02-22 Thread David MacKinnon
On 2/21/06, coulix <[EMAIL PROTECTED]> wrote: > > i have this website : > http://ozserver.no-ip.com:345/cefinban/recette/1 > i would like to highlight the menu link representing the current page, > for example if its "contacts" , the ">> contacts link in the menu > should be bold. > > using templa

Re: how to implement RequiredIfOtherFieldEquals validation?

2006-02-22 Thread gizo
ahhh! The 'periodType' field I am testing against is currently set up as a SelectField, which is being generated by the manipulator (choices=choice_list). And that somehow doesn't work. I changed it to a TextField, and entered 'Month', and it works wonderfully. Yay, mostly --

django on mod_python - again...

2006-02-22 Thread iGL
Hi, My hosting provider is planning to provide django support. I volunteered to beta test it. Things are mainly ok, however, when I tried to deploy http://source.socialistsoftware.com/sssource/ by Jay Graves, I, all of a sudden, encountered a problem: MSIE refuses("page cannot be displayed) and Fi

Re: How to implement this fucntionality ? (current page higlighting)

2006-02-22 Thread akaihola
Sorry, my mistake. Actually you can't insert anything into the context in urls.py. I was thinking of the ability to pass extra arguments for your view functions, which is of little use here. So I'd either use the method I illustrated above or go with the CSS method. Either way, you need to insert

Validation across multiple fields

2006-02-22 Thread Russell Cloran
Hi, I have a sinking feeling that I'm missing something obvious here, so I guess it's worth asking the list :) I'm using magic-removal, and... I have a model which defines a time range, using a from_date and to_date DateTimeField. Only one record may exist in the database for any one point in t

Re: admin-logout + opera8.52?

2006-02-22 Thread Luke Plant
On Tuesday 21 February 2006 22:45, gabor wrote: > hi, > > is there anyone using opera8? > > because for me it seems that i am unable to log out using opera8.* > from the admin interface. > > so before i start digging deeper...does anyone else has this problem? Just tried it with 8.51 . I get a

Re: user login over ssl

2006-02-22 Thread [EMAIL PROTECTED]
Thank you, Adrian. I will give this a go. --~--~-~--~~~---~--~~ 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, sen

Re: user login over ssl

2006-02-22 Thread Adrian Holovaty
On 2/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > How could we have a user login to a django-powered app over ssl? Hi Chris, There's nothing Django-specific about using SSL. Just set up your certificates and stuff in Apache and set up Django as usual. It just works. Adrian -- Adrian H

user login over ssl

2006-02-22 Thread [EMAIL PROTECTED]
How could we have a user login to a django-powered app over ssl? Thanks! --~--~-~--~~~---~--~~ 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 u

Re: view documention in admin is empty

2006-02-22 Thread [EMAIL PROTECTED]
ok I can see the views now after setting ADMIN_FOR in settings.py, but I'm still missing most of the content on those pages I just get the label, and a < Back to Views Documentation underneath (missing context and templates) any ideas? --~--~-~--~~~---~--~--

Re: How to implement this fucntionality ? (current page higlighting)

2006-02-22 Thread coulix
Method 1 - the current page (or section) in the context. You can do it in your urls.py url.py : r'recette/$', 'cefinban.recettes.views.index',{'section': 'index'}), -> result in Exception Type: TypeError Exception Value:create_recette() got an unexpected keyword argum

Re: url.py parsing and mod_python, recurent problem.

2006-02-22 Thread Kenneth Gonsalves
On Wednesday 22 Feb 2006 1:33 pm, coulix wrote: >  # Uncomment this for admin: > (r'^admin/', include('django.contrib.admin.urls.admin')), (r'^mywebsite/admin/', include('django.contrib.admin.urls.admin')), -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್

Re: flatpages

2006-02-22 Thread John Szakmeister
On Wednesday 22 February 2006 08:22, Mary Adel wrote: > how to call in flatpage a content i have saved in the database > ex i saved the path of the css and java script in the database and i > need to call it in my flatpage so how i could do this The best way is probably to create a templatetag th

Re: url.py parsing and mod_python, recurent problem.

2006-02-22 Thread [EMAIL PROTECTED]
here are the docs: http://www.djangoproject.com/documentation/url_dispatch/ now, django always parsers urls from the root. if thats not the case, the easiest thing you could do is just match all r'^mywebsite/ to like, myproject.suburls and then create the sub matches. unfortunatly thats the way

url.py parsing and mod_python, recurent problem.

2006-02-22 Thread coulix
hi, i ll just describe a basic installation of django on apache and point the strang behavior. django version : 0.91 Apache 2.0.54 Mod_python 3.1 + create a django project "cefinban" in /home/greg/django/ (django-admin.py startproject cefinban) + initialise everythng add a fake app model, and