Re: NewForms Choice Field Working ?

2007-10-04 Thread Chris Brand
staff-gmail wrote: > I'm using vers .96 > I converted a char field to have choices > > old: prefix = models.CharField(maxlength=100, default = 'Mr.') > > I then changed my model: > SALUTATION=( > ('Mr.','Mr.'), > ('Ms.','Ms.'), > ) > ... > prefix = models.CharField(maxlength=100,

Re: Problem with nesh.thumbnail

2007-10-04 Thread Divan Roulant
Thank you so much Jake for pointing me on this valuable source. That was the problem. Divan On Oct 4, 12:11 pm, jake elliott <[EMAIL PROTECTED]> wrote: > hi divan, > > Divan Roulant wrote: > > "'myproject.thumbnail' is not a valid tag library: Could not load > > template library from

NewForms Choice Field Working ?

2007-10-04 Thread staff-gmail
I'm using vers .96 I converted a char field to have choices old: prefix = models.CharField(maxlength=100, default = 'Mr.') I then changed my model: SALUTATION=( ('Mr.','Mr.'), ('Ms.','Ms.'), ) ... prefix = models.CharField(maxlength=100, choices=SALUTATION, default='Mr.') I then ran

Re: custom method for view

2007-10-04 Thread Goon
Looks like that works! Thanks very much > > i.e. > > my_model_instance = myClass.objects.get(pk=12) > my_model_instance.getValue() > > -joe > > On 10/4/07, Goon <[EMAIL PROTECTED]> wrote: > > > > > > > probably a dumb question, what's the syntax for calling a method in > > models.py from

Re: custom method for view

2007-10-04 Thread Joseph Heck
Get an instance of the model and call getValue() on it. i.e. my_model_instance = myClass.objects.get(pk=12) my_model_instance.getValue() -joe On 10/4/07, Goon <[EMAIL PROTECTED]> wrote: > > probably a dumb question, what's the syntax for calling a method in > models.py from views.py? > > so

custom method for view

2007-10-04 Thread Goon
probably a dumb question, what's the syntax for calling a method in models.py from views.py? so like: #models.py class myClass (models.Model): value = 24 def getValue(self): return value #views.py def myFunction(): myData = ###what do I put here to call "getValue()" instead

Re: Plz, I am just new to Python...

2007-10-04 Thread Derek Payton
> > I tried downloading Django and installing it on my windows looks very > > difficult. Plsease can anyone help me on how to install Django and how > > to go about starting web development in Phyton? I think your best bet would be to follow John's advice: > I'm not sure of the details for

Re: Sending encrypted email

2007-10-04 Thread Joseph Heck
Sorry - Its worth noting that you could start by working with the EmailMultiAlternatives class in django.core.mail. It has a method "attach_alternative()" that works on the EmailMessage subclass to attach alternative representations of the content. I'm not sure what the "right" way to send an

Re: Sending encrypted email

2007-10-04 Thread Joseph Heck
Nothing built in - You're going to have to head towards the low-level libraries to make this happen. -joe On 10/4/07, Francis <[EMAIL PROTECTED]> wrote: > > Hello, > > I need to send an email with a encrypted part in it. Is there a built- > in way to do this in python or django (since it is a

Re: Something like an "all in" for filter of related set

2007-10-04 Thread Bill Dawson
On Thu, 2007-10-04 at 16:38 -0400, Malcolm Tredinnick wrote: > On Thu, 2007-10-04 at 20:08 +, bill wrote: > > Hi folks, > > I've reviewed the db api documentation page, and I'm pretty sure it > > didn't have an example that would help me with this request. I'd like > > something like the

Re: Plz, I am just new to Python...

2007-10-04 Thread John
On Oct 4, 11:09 am, Emperor of thought <[EMAIL PROTECTED]> wrote: > Please i am just new to python and i will like to know how i can go > about in web development. I am migrating from PHP and phyton web > environment does not look very familiar. Python has a number of frameworks and libraries

Sending encrypted email

2007-10-04 Thread Francis
Hello, I need to send an email with a encrypted part in it. Is there a built- in way to do this in python or django (since it is a django apps). Maybe the entire can be encrypted, but it is only a piece that requires it. i look at some encryption mechanism, but nothing seem to be

Re: Completely caching ContentType into memory

2007-10-04 Thread Alexander Solovyov
On 4 окт, 22:16, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Have a look at CONTENT_TYPE_CACHE in > django/contrib/contenttypes/models.py. I've done .get method with caching by model and app_label (and even without app_label). I'm not sure it is clean to be added as ticket with patch for

Re: Using VIEWs from a database

2007-10-04 Thread Joe
On Oct 4, 3:39 pm, Jonathan Ballet <[EMAIL PROTECTED]> wrote: > * I have methods on instances of my class which should not be there > (.create, .delete, .save) (at least, I'm not using materialized > views). I think a good thing to do with these would be to override the methods and raise a

Re: Something like an "all in" for filter of related set

2007-10-04 Thread Malcolm Tredinnick
On Thu, 2007-10-04 at 20:08 +, bill wrote: > Hi folks, > I've reviewed the db api documentation page, and I'm pretty sure it > didn't have an example that would help me with this request. I'd like > something like the "IN" operator that can be used in a lookup on a > field in a related

En Güzel Kızlar , en yakışıklı Erkekler

2007-10-04 Thread turk970
Clubzuzu www.clubzuzu.com Yeni arkadaşlıklar ,dostluklar ,ilişkilermi arıyorsunuz? Clubzuzu ile bu çok kolay ve ücretsiz. Arkadaşlarınızla chat yapabilir, mail gönderebilir,beğendiğiniz kişileri listenize ekleyebilir, profillerine bakarak size en uygun arkadaşı bulabilirsiniz. Ayrıca

Re: Using VIEWs from a database

2007-10-04 Thread Marty Alchin
On the other side of it, this could almost be done by simply creating a new base class which your view-based model could subclass, instead of models.Model. It could share much of the existing Model code, allowing for declarative syntax, adding in the default manager, processing Meta options, etc.

Something like an "all in" for filter of related set

2007-10-04 Thread bill
Hi folks, I've reviewed the db api documentation page, and I'm pretty sure it didn't have an example that would help me with this request. I'd like something like the "IN" operator that can be used in a lookup on a field in a related model, but more like something that I guess could be called

Re: Using VIEWs from a database

2007-10-04 Thread Malcolm Tredinnick
On Thu, 2007-10-04 at 12:39 -0700, Jonathan Ballet wrote: > Hi everyone, > > I have a project which uses a PostgreSQL database with several tables, > and I have created VIEWs in this database. > > Now, I would like to be able to use those views from my Django > project. Is there any "official"

Using VIEWs from a database

2007-10-04 Thread Jonathan Ballet
Hi everyone, I have a project which uses a PostgreSQL database with several tables, and I have created VIEWs in this database. Now, I would like to be able to use those views from my Django project. Is there any "official" way to do this ? Currently, I made a new Model class, with the same

Re: Completely caching ContentType into memory

2007-10-04 Thread Alexander Solovyov
On 4 окт, 22:16, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2007-10-04 at 12:11 -0700, Alexander Solovyov wrote: > > Hi, > > > I'm working on some big site and we are using content types very often > > (for generic relations). And there are one idea appeared - why not > > cache

All secret recipes of top fast food resturants free

2007-10-04 Thread [EMAIL PROTECTED]
All secret recipes of top fast food resturants free i.e McDonald's, KFC, Wendy's, Papa john's, chili's, Heinz, kellogs all available at http://secretrecipesleaked.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

All secret recipes of top fast food resturants free

2007-10-04 Thread [EMAIL PROTECTED]
All secret recipes of top fast food resturants free i.e McDonald's, KFC, Wendy's, Papa john's, chili's, Heinz, kellogs all available at http://secretrecipesleaked.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Completely caching ContentType into memory

2007-10-04 Thread Malcolm Tredinnick
On Thu, 2007-10-04 at 12:11 -0700, Alexander Solovyov wrote: > Hi, > > I'm working on some big site and we are using content types very often > (for generic relations). And there are one idea appeared - why not > cache content types in the memory completely. > > Just replacing default manager

Completely caching ContentType into memory

2007-10-04 Thread Alexander Solovyov
Hi, I'm working on some big site and we are using content types very often (for generic relations). And there are one idea appeared - why not cache content types in the memory completely. Just replacing default manager of ContentType class (with monkey- patching) with another, which will cache

Using edit_inline DateField is not showing up

2007-10-04 Thread Greg
Hello, I have a table called Orders. Which stores information about each order that I get. It also has the ability to send email's to the customer's email address. I also have another table called EmailSent that store information about each email that I send through the admin. My EmailSent

Re: Apache2/mod_python can't import project settings

2007-10-04 Thread Malcolm Tredinnick
On Thu, 2007-10-04 at 09:34 -0700, juampa wrote: > Hello all: > > I am deploying a Django project with Apache 2.0.55 and mod_python > 3.3.1 on Mac OS X Panther 10.3.9 server. > The problem is that when I try to load the page on my browser, I get a > mod_python debug error indicating that my

Re: Updating multiple records from one HTML form

2007-10-04 Thread James Mulholland
It worked, first time :-) For the record, this is what the code looks like now: urls.py: (r'address/edit/(?P\d+)/', 'testdb.mtable.views.edit_address') views.py: def edit_address(request, id=None): address = Address.objects.get(pk=id) country = address.country AddressForm =

Re: django database setup problem

2007-10-04 Thread Joseph Heck
I'd recommend installing http://download.fedora.redhat.com/pub/fedora/linux/core/4/i386/os/Fedora/RPMS/MySQL-python-1.2.0-1.i386.rpm If I remember correctly, Fedora (RPM) has no trouble with using a remote RPM file - so the following should do the trick: rpm -Uvh

Re: Plz, I am just new to Python...

2007-10-04 Thread cjl
EOT: You may want to check out my project: http://www.instantdjango.com It is a Windows based, no-installation-required Django setup. I also have a basic tutorial, which should take you about 30 minutes to work through. It's not great, but it should give you a basic understanding of web

Re: Updating multiple records from one HTML form

2007-10-04 Thread James Mulholland
Thanks -- I'll try those ideas as well. On Oct 4, 4:05 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On 10/4/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > > > It's using the save() method from AddressForm, which only knows about > > its own fields. > > You should also verify that is_valid() is

Apache2/mod_python can't import project settings

2007-10-04 Thread juampa
Hello all: I am deploying a Django project with Apache 2.0.55 and mod_python 3.3.1 on Mac OS X Panther 10.3.9 server. The problem is that when I try to load the page on my browser, I get a mod_python debug error indicating that my project's settings cannot be imported by django/conf/__init__.py

Re: Plz, I am just new to Python...

2007-10-04 Thread Chris Hoeppner
El jue, 04-10-2007 a las 15:09 +, Emperor of thought escribió: > Please i am just new to python and i will like to know how i can go > about in web development. I am migrating from PHP and phyton web > environment does not look very familiar. > I tried downloading Django and installing it on

Re: QuerySet.extra() and bind variables

2007-10-04 Thread tzeskimo
Thanks for letting me know. I was afraid I was missing something obvious. On Oct 4, 5:48 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2007-10-03 at 22:44 +, tzeskimo wrote: > > I'm trying to write a custom QuerySet, but I'm a bit confused about > > how to properly use the

Custom View to save file

2007-10-04 Thread jacoberg2
Hey, i had issues with this before but i fixed the login problem i believe. I cant seem to get my view to work it is supposed to take the file from the form on the template and save it to my database and directory. saving a file in the admin works just fine so i need some help fixing the view and

Re: Problem with nesh.thumbnail

2007-10-04 Thread jake elliott
hi divan, Divan Roulant wrote: > "'myproject.thumbnail' is not a valid tag library: Could not load > template library from django.templatetags.apparto.thumbnail, No module > named myproject.thumbnail" here's the change that's tripping you up:

Re: No tests for newforms

2007-10-04 Thread Malcolm Tredinnick
On Thu, 2007-10-04 at 17:33 +0200, Thomas Güttler wrote: > Hi, > > I was told to include a test in my newforms patch: > > http://code.djangoproject.com/ticket/5335 > > I couldn't find any tests for newforms. Am I blind? They are in tests/regressiontests/forms/. Regards, Malcolm

Re: Random objects in view

2007-10-04 Thread RajeshD
Hi Alessandro, Replace: items.filter(provincia__iexact=provincia) with items = items.filter(provincia__iexact=provincia) Similarly, replace items.filter(tipo__iexact=tipo) with items = items.filter(tipo__iexact=tipo) Remember that whenever you filter an existing queryset in order to

ANN: A Django template tag for integrating a Flash based flv player

2007-10-04 Thread peschler
I'm happy to announce the release of my Django template tag for integrating a Flash based flv player into Django templates. The application including documentation and sourcecode can be found at: http://pyjax.net/blog/1/2007/09/28/django-template-tag-integrating-flash-based-flv-pl/ The

Re: how to scale

2007-10-04 Thread James Bennett
On 10/4/07, Andrey Khavryuchenko <[EMAIL PROTECTED]> wrote: > JB> You mean no projects using MySQL Replication, > > Did I? I think I've said exactly opposite. You jumped from "MySQL Replication won't work" to "no big projects will use Django". Big projects already are using Django, therefore

newform-Question

2007-10-04 Thread Andreas Madsack
Hello django-users, I am experimenting a bit with the newforms library. My problem is, that I use a Foreign-Key in a Table and want to view (and edit) only one entry of this Table. The request.POST gives no user-value and the form is not valid, because of this missing value. How can I add the

No tests for newforms

2007-10-04 Thread Thomas Güttler
Hi, I was told to include a test in my newforms patch: http://code.djangoproject.com/ticket/5335 I couldn't find any tests for newforms. Am I blind? Thomas -- Thomas Güttler, http://www.tbz-pariv.de/ Bernsdorfer Str. 210-212, 09126 Chemnitz, Tel.: 0371/5347-917 TBZ-PARIV GmbH

Re: Updating multiple records from one HTML form

2007-10-04 Thread Marty Alchin
On 10/4/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > It's using the save() method from AddressForm, which only knows about > its own fields. You should also verify that is_valid() is in fact checking all the fields as well. I suspect that, like save(), it's only looking at the AddressForm

Re: Updating multiple records from one HTML form

2007-10-04 Thread Marty Alchin
On 10/4/07, James Mulholland <[EMAIL PROTECTED]> wrote: > The form is rendered OK, and any changes to the 'Address' record are > saved. Changes to the 'Country' record aren't, however, and I wondered > if there's a way to do this. Any help much appreciated :) It's using the save() method from

Re: django database setup problem

2007-10-04 Thread swati
Thanks Joe, I recompiled the python with zlib support and tried to install mysqldb, now I am not getting the error of zlib anymore. But got error with gcc compiler. Part of the error is something like,-

Re: Updating multiple records from one HTML form

2007-10-04 Thread James Mulholland
Thanks for the help :) Seems like a very sound approach, not least because I understand it! -- James On Oct 4, 3:53 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2007-10-04 at 07:37 -0700, James Mulholland wrote: > > Hi, > > > [Note: apologies for the double post. Google didn't

Re: Updating multiple records from one HTML form

2007-10-04 Thread Malcolm Tredinnick
On Thu, 2007-10-04 at 07:37 -0700, James Mulholland wrote: > Hi, > > [Note: apologies for the double post. Google didn't offer to preview > the message, which is what I was trying to do...] > > I'm starting to investigate newforms in detail (having previously used > the old forms library) since

Updating multiple records from one HTML form

2007-10-04 Thread James Mulholland
Hi, [Note: apologies for the double post. Google didn't offer to preview the message, which is what I was trying to do...] I'm starting to investigate newforms in detail (having previously used the old forms library) since I have a job to convert an Access DB to web format. The client wants to

Updating multiple records from one HTML form

2007-10-04 Thread James Mulholland
Hi, I'm starting to investigate newforms in detail (having previously used the old forms library) since I have a job to convert an Access DB to web format. The client wants to maintain a similar layout to what they have in Access, which in places means having one page which has several records

Re: Random objects in view

2007-10-04 Thread Alessandro Ronchi
2007/10/2, Tomas Kopecek <[EMAIL PROTECTED]>: > Maybe it is worth a ticket in trac. I tried, but it says: 500 Internal Server Error (Submission rejected as potential spam (Maximum number of posts per hour for this IP exceeded, Akismet says content is spam)) (I didn't send any other post) Your

Re: how to scale

2007-10-04 Thread Andrey Khavryuchenko
James, JB> On 10/3/07, Andrey Khavryuchenko <[EMAIL PROTECTED]> wrote: >> The only thing django app should know is that there are two different >> *kinds* of servers: read-only and whole access. It doesn't matter how many >> servers you have - you may well have pool of masters and pool of

Re: how to scale

2007-10-04 Thread Andrey Khavryuchenko
AA> Am 03.10.2007 um 12:36 schrieb Andrey Khavryuchenko: AA> It's possible to use circular replication together with some free AA> load balancing software. As I've told earlier, I know perfectly about circular replication. AA> Then there's MySQL Proxy that allows you to manipulate

Re: Adding extra info to HttpResponseRedirect

2007-10-04 Thread Malcolm Tredinnick
On Thu, 2007-10-04 at 09:50 +, francois wrote: > > > On 3 oct, 18:54, "James Bennett" <[EMAIL PROTECTED]> wrote: > > > http://www.djangoproject.com/documentation/authentication/#messages > > > > Can I use messages with a HttpResponseRedirect? No. This corresponds to an HTTP 302 response

Re: What's going on with Row Level Permissions?

2007-10-04 Thread Malcolm Tredinnick
On Thu, 2007-10-04 at 12:45 +, RKnobelspies wrote: > We are also working on projects that require some form of RLP- > functionality but at the same time we need to work with the actual > trunk-version of django to take advantage of the recent improvements > with forms. > > There was a

Re: QuerySet.extra() and bind variables

2007-10-04 Thread Malcolm Tredinnick
On Wed, 2007-10-03 at 22:44 +, tzeskimo wrote: > I'm trying to write a custom QuerySet, but I'm a bit confused about > how to properly use the method extra(). From my understanding, > extra() accepts both "select" and "where" arguments, both of which can > contain bind variables. You then

Re: What's going on with Row Level Permissions?

2007-10-04 Thread RKnobelspies
We are also working on projects that require some form of RLP- functionality but at the same time we need to work with the actual trunk-version of django to take advantage of the recent improvements with forms. There was a conversation on the django-sprint IRC between Malcolm and a person, who

Re: Mac OS X 10.4 + Python 2.4.3 + Django + Apache2 + mod_python

2007-10-04 Thread Graham Dumpleton
On Oct 4, 6:35 pm, dstuart <[EMAIL PROTECTED]> wrote: > Just a quick note to say mod_wsgi does support Apache 2 from the site: > > "The mod_wsgi package can be compiled for and used with either Apache > 1.3, 2.0 or 2.2 on UNIX systems (including Linux), as well as Windows. > Either the single

Check it out:Very good online resources,tons of cool men and beautiful women eager for lovers....:

2007-10-04 Thread jack
Check it out:Very good online resources,tons of cool men and beautiful women eager for lovers: 1.Buy tickets online: http://groups.google.com/group/all-good-things/web/want-to-buy-tickets-online-come-here 2.No 1 social network:

Re: overriding FileField.save() to do something with the file

2007-10-04 Thread Marty Alchin
On 10/4/07, Simone Cittadini <[EMAIL PROTECTED]> wrote: > How I get the name/path oh the "just saved" file so I can process it ? http://www.djangoproject.com/documentation/db-api/#get-foo-filename -Gul --~--~-~--~~~---~--~~ You received this message because you

Re: Adding extra info to HttpResponseRedirect

2007-10-04 Thread Samuel Adam
HttpResponseRedirect doesn't return a template so you just need to add your message before the redirect: request.user.message_set.create(message="Your playlist was added successfully.") You should implement the display of your messages on your base template like this: {% for message in messages

Re: Custom validation for models in admin

2007-10-04 Thread jr
The following did it for me: from django import newforms as forms class yourForm(forms.BaseForm): ... def clean(self): "do your custom validation here" return self.cleaned_data does it for me. Clean is called automatically e.g. by ...is_valid(). hope it helps. jr On Sep 11,

overriding FileField.save() to do something with the file

2007-10-04 Thread Simone Cittadini
I have such a Model : class FileToProcess(models.Model): file = models.FileField(upload_to='somewhere') def save(self): super(FileToProcess, self).save() f = open([???], 'r') for line in f.read(): How I get the name/path oh the "just saved"

Re: Adding extra info to HttpResponseRedirect

2007-10-04 Thread francois
On 3 oct, 18:54, "James Bennett" <[EMAIL PROTECTED]> wrote: > http://www.djangoproject.com/documentation/authentication/#messages > Can I use messages with a HttpResponseRedirect? In the example given I need to give the context_instance but how to do that with HttpResponseRedirect (which

Problem with nesh.thumbnail

2007-10-04 Thread Divan Roulant
Hello, recently, I upgraded to the last development version of Django from a version dating back to around last June (I can't remember the exact version). Since then, I can't get thumbnails and I keep getting the message: "'myproject.thumbnail' is not a valid tag library: Could not load

Re: Mac OS X 10.4 + Python 2.4.3 + Django + Apache2 + mod_python

2007-10-04 Thread dstuart
Just a quick note to say mod_wsgi does support Apache 2 from the site: "The mod_wsgi package can be compiled for and used with either Apache 1.3, 2.0 or 2.2 on UNIX systems (including Linux), as well as Windows. Either the single threaded 'prefork' or multithreaded 'worker' Apache MPMs can be

Re: Pyexcelerator VLOOKUP can't parse formula

2007-10-04 Thread pbzRPA
Found a solution for my problem. There is a patch that you can download so that you can reference other worksheets. https://sourceforge.net/tracker/index.php?func=detail=1687510_id=134081=730645 Hope it helps. PB --~--~-~--~~~---~--~~ You received this message