Re: nested function

2007-06-29 Thread dailer
On Jun 27, 8:52 pm, dailer <[EMAIL PROTECTED]> wrote: > I created a validator for use in a validator_list in the admin > interface like so... > > def startDate_EndDate_CrossValidation(modelName): > def result(field_data, all_data): > > > being ne

Re: nested function

2007-06-29 Thread dailer
On Jun 27, 8:52 pm, dailer <[EMAIL PROTECTED]> wrote: > I created a validator for use in a validator_list in the admin > interface like so... > > def startDate_EndDate_CrossValidation(modelName): > def result(field_data, all_data): > > > being ne

Re: pydoc problem

2007-06-28 Thread dailer
On Jun 28, 12:31 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2007-06-27 at 18:58 -0700, dailer wrote: > > I have a models.py module that I thought I would test pydoc on. So I > > try. > > > $ python manage.py shell > > Python 2.5.1 (r251:

Re: nested function

2007-06-27 Thread dailer
errr. i didn't do too well with my first post. Actually, my model validation calls startDate_EndDate_CrossValidation just find via a validator_list. The problem is I'm trying to write a tester and don't know how to call startDate_EndDate_CrossValidation and get field_data and all_data passed in.

Re: nested function

2007-06-27 Thread dailer
errr. i didn't do too well with my first post. Actually, my model validation calls startDate_EndDate_CrossValidation just find via a validator_list. The problem is I'm trying to write a tester and don't know how to call startDate_EndDate_CrossValidation and get field_data and all_data passed in.

pydoc problem

2007-06-27 Thread dailer
I have a models.py module that I thought I would test pydoc on. So I try. $ python manage.py shell Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from

nested function

2007-06-27 Thread dailer
I created a validator for use in a validator_list in the admin interface like so... def startDate_EndDate_CrossValidation(modelName): def result(field_data, all_data): being new to python, I stole this from an example somewhere. I have these 3 attributes, but how do I call

object serialization problem

2007-06-21 Thread dailer
seems like a very simple example based on http://www.djangoproject.com/documentation/0.96/serialization/: def exportCountryCodeFixture(): from django.core import serializers from mysite.models import CountryCode out = open("CountryCode.xml", "w") serializers.serialize("xml",

bug? admin, edit_inline=models.TABULAR, ValidationError

2007-06-19 Thread dailer
In the following case, the admin interface will highlight the fields as an error but not display the message. Is this a bug? def test_validate(field_data, all_data): raise ValidationError, "that is not good" class TestModel(models.Model): testFk= models.ForeignKey(OtherModel,

template error

2007-06-17 Thread dailer
I"m trying to test mptt: http://code.djangoproject.com/wiki/ModifiedPreorderTreeTraversal I keep getting this error: 'module' object has no attribute '__path__' The error comes from: C:\Python25\lib\site-packages\django\template\__init__.py in get_library, line of code: mod =

Re: yearless date

2007-06-06 Thread dailer
thx, since I don't know python or django, just looking for some level of comfort I'm on track. Right now I'm actually playing with sub- classing a Field class and having *some* luck with it. On Jun 6, 12:05 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 6/6

yearless date

2007-06-05 Thread dailer
looking for ideas on the best way to handle this. I have a need to set up date ranges not tied to a particular year, like Jan 1 - Feb 12. I like that the admin interface provides a date selector so I'm tempted to just use a DateField and ignore the fact that I would be selecting a specific year.

Re: noob minlength question

2007-06-05 Thread dailer
thx, that's what I thought but wasn't sure if I was missing something. I don't really like that you then have.. maxlength=3, validator_list=... I guess I could subclass CharField On Jun 5, 10:33 am, Tim Chase <[EMAIL PROTECTED]> wrote: > > seems silly but how do I specify minimum length

noob minlength question

2007-06-05 Thread dailer
seems silly but how do I specify minimum length for a CharField. Would that require customer validation? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to