Re: Custom SQL - MySQL Dictcursor

2007-02-11 Thread Dirk Eschler
On Freitag, 9. Februar 2007, Dirk Eschler wrote: > Hello, > > is there a way to get a dictcursor from Django when using custom MySQL? > > >from django.db import connection > > cursor = connection.cursor() > cursor.execute("SELECT [...]") > cursor.fetchall() > > The above fetchall returns a tuple,

creating custom "filter_*" methods for objects

2007-02-11 Thread Martin Winkler
Hi all, many of my models have a boolean field "is_active". Now I'd like to implement a convenience method that automatically uses this field when accessing my models. What is the best way to implement something like MyModel.objects.filter_active()? One (quite non-elegant) way would be adding

Re: Authenticate during middleware call

2007-02-11 Thread Mike H
Hi all, I figured out the problem I was having, the example in the documentation I followed for doing the authentication backend didn't have the first 'self' argument, so the authentication was never triggered. Mike On 2/10/2007, "Mike H" <[EMAIL PROTECTED]> wrote: > > >Hi all, > >I am puttin

Quick but authenticated static file content.

2007-02-11 Thread [EMAIL PROTECTED]
This is more of a deployment/design question than specifically about Django but its done within the content of a Django-based application framework. I'm developing a general http-based file server whose access is controled by a custom authentication&authorization system I have developed a

Re: creating custom "filter_*" methods for objects

2007-02-11 Thread [EMAIL PROTECTED]
Hi, On 11 Lut, 12:32, Martin Winkler <[EMAIL PROTECTED]> wrote: > One (quite non-elegant) way would be adding a method to the class > Manager in django.db.models.manager like this: > > def filter_active(self, *args, **kwargs): > kwargs['is_active'] = kwargs.get('is_active', True) >

Re: creating custom "filter_*" methods for objects

2007-02-11 Thread Martin Winkler
Am 11 Feb 2007 04:07:03 -0800 schrieb "[EMAIL PROTECTED]" > > On 11 Lut, 12:32, Martin Winkler <[EMAIL PROTECTED]> wrote: > > One (quite non-elegant) way would be adding a method to the class > > Manager in django.db.models.manager like this: > > > > def filter_active(self, *args, **kwargs):

Re: [howto] Django profiling with hotshot and kcachegrind

2007-02-11 Thread Robert Coup
[EMAIL PROTECTED] wrote: > The link: http://www.rkblog.rk.edu.pl/w/p/django-profiling-hotshot-and- > kcachegrind/ > The cool screenshot: http://www.rkblog.rk.edu.pl/site_media/resources/ > python.rk.edu.pl/images/djangoprof2.png > > Kcachegrind can visualize profilers logs in many nice readable >

Re: how to set the choices of Select Widget by code in the newforms

2007-02-11 Thread Cathy Young
On Feb 10, 11:42 pm, "gordyt" <[EMAIL PROTECTED]> wrote: > > I don't think there's any way of accessing the request.user from the > > Form class (is there?). If I could pass in the choices when I'm > > instantiating the form from views.py my problem would be solved. Is > > this possible? > > Cathy

use newforms in regestration problem

2007-02-11 Thread lee
hi all, I am a newbie to django, I want to use 'newforms' module to generate a regestration page, because it can validate the data automatically, but there is a problem: As usual, web site always let people input password twice when regestering , so how could I check whether the two pass

Re: use newforms in regestration problem

2007-02-11 Thread Honza Král
On 2/11/07, lee <[EMAIL PROTECTED]> wrote: > hi all, > > I am a newbie to django, I want to use 'newforms' module to generate a > regestration page, because it can validate the data automatically, but > there is a problem: > > As usual, web site always let people input password twice when

Re: new forms - problem populating with data from a table

2007-02-11 Thread Lawrence Oluyede
> is there any reason why you copy the data? the form doesn't need the > data to be mutable, so there is no need for this. None special reasons to be honest. > I prefer constructing a dict manually than to mess around with python > internals, but that is really just a matter of personal preferen

K9 ===========SUPER AND FREE WEB PROTECTION========== K9

2007-02-11 Thread AYSAN 72
*YOU MUST DOWNLOAD* ** *LINK: K **9 Web Protection * --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django us

Clone DjangoBook.com -- Open book platform beta release

2007-02-11 Thread limodou
Recently I made a clone project similar djangobook.com, but I add some extra management features, for example: Multi-User Multi-Book Many things I borrowed from djangobook.com, especially the css. But the ajax functionality I use jQuery, and also implement a similar comment dialog. But I'm not a

Registration confirmation view

2007-02-11 Thread voltron
Hi all, I plan on using newForms and the auth module for my site. All of the examples I have seen involve extracting form data and creating a user in the database immediately, how can I "shortcircuit" this process to allow one to confirm ones registration per email? What is the preferred "Django

(DB related?) Memory leak with apache and mod_python

2007-02-11 Thread Mason Simon
I'm developing a Django project on Webfaction, and I noticed my memory leaking. To isolate the cause, I started a fresh project. The only things I changed in this brand new django project were the DEBUG setting, which I set to False, and the database settings, which I configured for a sqlite3 file

date picker widget in my custom views

2007-02-11 Thread Picio
Hello, I'm using 0.95 and I'd like to use the django admin date picker (calendar.js) in my custom view. I saw that I have to use DateTimeShortcuts.js and calendar.js but I'm not a JavaScript expert. I can't figure out how to implement the widget in the page. Which are the right and only

Re: use newforms in regestration problem

2007-02-11 Thread lee
2007/2/11, Honza Král <[EMAIL PROTECTED]>: > > > you can just add a clean_password method to your Form class that would > compare the two fields values and raise a ValidationError if they > don't match Thank you for your reply ,but I can't very understand your meaning , this is what I write : c

Re: ForeignKey, null, and schema evolution

2007-02-11 Thread David Abrahams
"Ramiro Morales" <[EMAIL PROTECTED]> writes: > On 2/10/07, David Abrahams <[EMAIL PROTECTED]> wrote: >> >> Whatever django bugs may be lurking asid, I need to move forward with >> my project ASAP so I'd really appreciate it if someone could give me a >> few hints about how to evolve my existing D

Re: Clone DjangoBook.com -- Open book platform beta release

2007-02-11 Thread johnny
What version of Django does it support, dev or 0.95? I was looking for some example in Django and jQuery. Thank You. John On Feb 11, 10:39 am, limodou <[EMAIL PROTECTED]> wrote: > Recently I made a clone project similar djangobook.com, but I add some > extra management features, for example: >

Re: Clone DjangoBook.com -- Open book platform beta release

2007-02-11 Thread limodou
On 2/12/07, johnny <[EMAIL PROTECTED]> wrote: > > What version of Django does it support, dev or 0.95? > I was looking for some example in Django and jQuery. Thank You. > django is dev version(trunk) I'v not used newforms yet. -- I like python! UliPad <>: http://wiki.woodpecker.org.cn/moin/UliP

Re: (DB related?) Memory leak with apache and mod_python

2007-02-11 Thread oggie rob
I had this same problem using a shared system. In my case, I think it was actually caused by subversion (run through mod_python with SSL). In particular, I noticed a problem whenever I committed changes to large binary files. Unfortunately I never managed to narrow down the problem. However I did

Re: Clone DjangoBook.com -- Open book platform beta release

2007-02-11 Thread [EMAIL PROTECTED]
I've tested it a bit. + nice and good way to present content, big sets of content :) - from SVN I get "openbookplatform" folder which needs to be changed to "openbook" ;) - chinese characters / which I don't see: http://www.fotosik.pl/showFullSize.php?id=4030c8e68eb7e4f6 - what is "Num:" in cha

Re: Clone DjangoBook.com -- Open book platform beta release

2007-02-11 Thread Adrian Holovaty
On Feb 11, 10:39 am, limodou <[EMAIL PROTECTED]> wrote: > Many things I borrowed from djangobook.com, especially the css. Hi Limodou, The djangobook.com CSS is *not* available for copying, so please change your project so that it uses your own custom CSS. Design theft isn't cool. Thanks, Adrian

Browse the Web faster than Internet explorer and Its free

2007-02-11 Thread coolmani
Free Browse the Web faster than Internet explorer and Its free Just click below for update and downloading the mozilla firefox http://www.freewebs.com/msmani007/freedownloads.htm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: use newforms in regestration problem

2007-02-11 Thread Matt H
Here's an example from the documentation for newforms. < http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L2204 > On 2/11/07, lee <[EMAIL PROTECTED]> wrote: > > > > 2007/2/11, Honza Král <[EMAIL PROTECTED]>: > > > > > > you can just add a clean_password meth

What about a list of finished django applications on the wiki ?

2007-02-11 Thread [EMAIL PROTECTED]
There are many django applications on code.google.com and on other sites, but not all of them are finished and ready to use or re-use. Why not make a "category" on the wiki for finished applications. Each page would describe the application, requirements, links, possibly some howtos etc. ? --~-

Re: use newforms in regestration problem

2007-02-11 Thread lee
Thank you ! That's exactly what I want. and I found http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L2243 is better Thank you again ! 2007/2/12, Matt H <[EMAIL PROTECTED]>: > > Here's an example from the documentation for newforms. > >

.....................K9 WEB PROTECTION

2007-02-11 Thread AYSAN 72
*YOU MUST DOWNLOAD* ** *LINK: K ** 9 Web Protection * -- -- http://proje.milliyet.com.tr/aysanca -

Newforms: Can I do these?

2007-02-11 Thread johnny
Can I create the following in newforms: forms.DateTimeField forms.IntegerField forms.FloatField forms.TextField forms.LargeTextField --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

compare date string in template

2007-02-11 Thread Patrick J. Anderson
Hi, I'm building a calendar for my site and in my template I need to evaluate whether the day is the first of the month. But I cannot do this, or it doesn't work as I expected: {% if equal "1" day|date:"j" %}do something{% endifequal %} or {% if equal "01" day|date:"d" %}do something{% endifequa

Re: Newforms: Can I do these?

2007-02-11 Thread Waylan Limberg
On Sun, 11 Feb 2007 17:43:44 -0500, johnny <[EMAIL PROTECTED]> wrote: > > Can I create the following in newforms: > > forms.DateTimeField yes > forms.IntegerField yes > forms.FloatField yes > forms.TextField try forms.CharField > forms.LargeTextField Not directly, but you can assign the

Re: Newforms: Can I do these?

2007-02-11 Thread Honza Král
yes $ sed -ne 's;^class \([a-zA-Z]\{1,\}\)(.*;\1;p' django/newforms/fields.py Field CharField IntegerField DateField TimeField DateTimeField RegexField EmailField URLField BooleanField NullBooleanField ChoiceField MultipleChoiceField ComboField MultiValueField SplitDateTimeField On 2/11/07, john

svn revision 4485 and mod_python broken

2007-02-11 Thread Michael
Hi All, After svn up to revision 4485 mod_python stop working: giving an error: PythonHandler django.core.handlers.modpython: EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined. Rollback to revision 4484 fixes this problem. Is anyone having the same problem? System D

Re: svn revision 4485 and mod_python broken

2007-02-11 Thread Malcolm Tredinnick
On Mon, 2007-02-12 at 12:19 +1300, Michael wrote: > Hi All, > > > After svn up to revision 4485 mod_python stop working: > > giving an error: > PythonHandler django.core.handlers.modpython: EnvironmentError: > Environment variable DJANGO_SETTINGS_MODULE is undefined. > > > Rollback to revisi

Re: svn revision 4485 and mod_python broken

2007-02-11 Thread Malcolm Tredinnick
On Mon, 2007-02-12 at 10:42 +1100, Malcolm Tredinnick wrote: [...] > I'll back out that changeset momentarily until we can think it through a > bit more. This has now been done. Updating to [4486] (current tip of trunk) should work. If not, please let us know. Regards, Malcolm --~--~-

Re: svn revision 4485 and mod_python broken

2007-02-11 Thread Russell Keith-Magee
On 2/12/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Mon, 2007-02-12 at 12:19 +1300, Michael wrote: > > Rollback to revision 4484 fixes this problem. > > > > Is anyone having the same problem? > > Oh, dear. I can see how this might be happening: When we import gettext, > we first check

Installation Question

2007-02-11 Thread Tavernaci
Hello I was searching for cms system which is very performant because I want to build a newssite and I found django, the references and the performance is preferct for me but I have a problem I have such webspace 250 mb Webspace 2 MySQL php Cgi can I install django on my webspace? you can see t

Re: Installation Question

2007-02-11 Thread Nathan R. Yergler
See http://www.djangoproject.com/documentation/install/ for installation information and requirements. Your PHP information doesn't matter in the least, since Django isn't PHP based. Nathan On 2/11/07, Tavernaci <[EMAIL PROTECTED]> wrote: > > Hello > > I was searching for cms system which is v

Re: Clone DjangoBook.com -- Open book platform beta release

2007-02-11 Thread limodou
On 2/12/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On Feb 11, 10:39 am, limodou <[EMAIL PROTECTED]> wrote: > > Many things I borrowed from djangobook.com, especially the css. > > Hi Limodou, > > The djangobook.com CSS is *not* available for copying, so please > change your project so that

Re: Newforms: Can I do these?

2007-02-11 Thread johnny
One last thing forgot to ask: What about forms.ImageField? --~--~-~--~~~---~--~~ 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

Re: Clone DjangoBook.com -- Open book platform beta release

2007-02-11 Thread limodou
On 2/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I've tested it a bit. > > + nice and good way to present content, big sets of content :) > - from SVN I get "openbookplatform" folder which needs to be changed > to "openbook" ;) > - chinese characters / which I don't see: > http://www.

Re: What about a list of finished django applications on the wiki ?

2007-02-11 Thread limodou
On 2/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > There are many django applications on code.google.com and on other > sites, but not all of them are finished and ready to use or re-use. > Why not make a "category" on the wiki for finished applications. Each > page would describe the ap

Re: Newforms: Can I do these?

2007-02-11 Thread Honza Král
On 2/12/07, johnny <[EMAIL PROTECTED]> wrote: > > One last thing forgot to ask: What about forms.ImageField? forms.FileField, but you have to do some coding on your own > > > > > -- Honza Kr�l E-Mail: [EMAIL PROTECTED] ICQ#: 107471613 Phone: +420 606 678585 --~--~-~--~~--

Help needed with select_related and a Many-to-many relationship.

2007-02-11 Thread Michael Lake
Hi all I made this post earlier but since then I have gone back to try and get this working by understanding things via the django shell. The app is for a lab where users will have a list of experiments. Each experiment consists of several procedures in order. I want to have a list of experi

Re: Help needed with select_related and a Many-to-many relationship.

2007-02-11 Thread Malcolm Tredinnick
On Mon, 2007-02-12 at 13:04 +1100, Michael Lake wrote: > Hi all > > I made this post earlier but since then I have gone back to try and get this > working > by understanding things via the django shell. The app is for a lab where > users will > have a list of experiments. Each experiment cons

Re: Help needed with select_related and a Many-to-many relationship.

2007-02-11 Thread Michael Lake
Malcolm Tredinnick wrote: > On Mon, 2007-02-12 at 13:04 +1100, Michael Lake wrote: > >>Hi all >> >>I made this post earlier but since then I have gone back to try and get this >>working >>by understanding things via the django shell. The app is for a lab where >>users will >>have a list of ex

Re: Help needed with select_related and a Many-to-many relationship.

2007-02-11 Thread Malcolm Tredinnick
On Mon, 2007-02-12 at 14:11 +1100, Michael Lake wrote: [...] > Excellent! > > And also thanks for the short python way to express that loop. No problems. Glad we could help you so fast. > > [ep.procedure for ep in e.experiment_procedure_set.all()] > > Next I'll work on trying to understand the

newb question: Kind of confused MEDIA_URL, MEDIA_ROOT, SITE_MEDIA and so on.

2007-02-11 Thread johnny
Do you keep your frontend related css,js file in separate folder other than admin (My assumption is admin, is the BACKEND)? I am confused with: ADMIN_MEDIA_PREFIX SITE_MEDIA MEDIA_ROOT MEDIA_URL --~--~-~--~~~---~--~~ You received this message because you are sub

date template filter + ifequal weirdness?

2007-02-11 Thread Patrick J. Anderson
I think I might be missing something, but I have a problem with date filter. Why doesn't this template code work? {% ifequal d|date:"l" "Sunday" %} {% else %} {% endifequal %} {{ d|date:"l" }} But inside the HTML list item {{ d|date:"l" }} produces full weekday names. Can and

Re: date template filter + ifequal weirdness?

2007-02-11 Thread Malcolm Tredinnick
On Mon, 2007-02-12 at 03:49 +, Patrick J. Anderson wrote: > I think I might be missing something, but I have a problem with > date filter. Why doesn't this template code work? > > {% ifequal d|date:"l" "Sunday" %} > > {% else %} > > {% endifequal %} > > {{ d|date:"l" }} > > Bu

Re: date template filter + ifequal weirdness?

2007-02-11 Thread Patrick J. Anderson
On Mon, 12 Feb 2007 15:32:07 +1100, Malcolm Tredinnick wrote: > On Mon, 2007-02-12 at 03:49 +, Patrick J. Anderson wrote: >> I think I might be missing something, but I have a problem with >> date filter. Why doesn't this template code work? >> >> {% ifequal d|date:"l" "Sunday" %} >> >

Re: svn revision 4485 and mod_python broken

2007-02-11 Thread Michael
Thank you, it is working again [4490] -- -- Michael --~--~-~--~~~---~--~~ 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

Re: Clone DjangoBook.com -- Open book platform beta release

2007-02-11 Thread limodou
I'v update the code and css, so if there are still some unsuitable places, please point them out. -- I like python! UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad My Blog: http://www.donews.net/limodou --~--~-~--~~~---~--~~ You received this message because

Re: Web services in Django

2007-02-11 Thread marxy
It might be good to see what our friends at TurboGears are up to with http://cheeseshop.python.org/pypi/TGWebServices/ cheers, peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to