Re: ValidationError in a ModelForm with a DateTimeField in the Model

2009-01-13 Thread Cortland Klein
Got it. Should be models.DateTimeField(blank=True, null=True, default=None) I shouldn't use default = "" on a DateTimeField. On Jan 12, 9:29 pm, "Cortland Klein" wrote: > Update: It looks like it's a DateTimeField (lastsenttotranslation) that's >

Re: ValidationError in a ModelForm with a DateTimeField in the Model

2009-01-12 Thread Cortland Klein
ast sent to Translation"), > blank=True, default="") > Do I need to set this to null=True instead? -- Cortland Klein +1 408 506 9791 http://pixelcort.com/ 2260 California Street #13 Mountain View, CA, USA 94040 --~--~-~--~~~---~--~~ You received th

ValidationError in a ModelForm with a DateTimeField in the Model

2009-01-12 Thread Cortland Klein
33 Here is where the DateTimeField is being defined. forms.py: http://dpaste.com/108341/ Lines: 10-13 Here is the form for Version. urls.py: http://dpaste.com/108343/ Lines: 5, 7 Here are the patterns which cause the failure. Any thoughts? -- Cortland Klei

Extending Group for a GroupProfile

2009-01-08 Thread Cortland Klein
ven matter since Group currently has no get_profile() function anyways? a: http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/ -- Cortland Klein Work: +1 408 862 3775 Mobile: +1 408 506 9791 Web Developer, Media and Technology Retail Training & Development

Re: inlineformset_factory with a custom widget for a field

2008-12-18 Thread Cortland Klein
ion, File, extra=1, > formfield_callback = my_formfield_cb) > formSet = FileFormSet() > > Marco > > On Dec 18, 8:18 pm, Cortland Klein wrote: >> I'm using inlineformset_factory in one of my views, which is working >> great, except now I'd like to change the widget for

inlineformset_factory with a custom widget for a field

2008-12-18 Thread Cortland Klein
response['fileformset']= FileFormSet(prefix="file", > instance=response['version']) > return render_to_response('redacted/version.html', response, > RequestContext(request)) Any ideas? -- Cortland Klein +1 408 506 9791 Web Dev

Re: filter on doubly-spanned relationship failing

2008-10-13 Thread Cortland Klein
Never mind; I was clashing variables. Thanks, #django IRC! On Oct 13, 12:05 pm, Cortland Klein <[EMAIL PROTECTED]> wrote: > In one of my views, I've got an answers =   > Answer > .objects > .select_related > (depth=2).filter(question__promotion__slug__exact=pro

Re: Best practice to build a multilingual site

2008-10-13 Thread Cortland Klein
rt? > (Of course I dont want to add title_en title_es... ) > > Thank you -- Cortland Klein <[EMAIL PROTECTED]> +1 408 506 9791 http://pixelcort.com/ 2260 California Street #13 Mountain View, CA, USA 94040 --~--~-~--~~~---~--~~ You received this messa

filter on doubly-spanned relationship failing

2008-10-13 Thread Cortland Klein
ow in self.query.results_iter(): > File "/Library/Python/2.5/site-packages/django/db/models/sql/ > query.py" in results_iter > 206. for rows in self.execute_sql(MULTI): > File "/Library/Python/2.5/site-packages/django/db/models/sql/ > query.py" in execut

Google Analytics Cookies invalidating Caching Middleware

2008-09-29 Thread Cortland Klein
t=utf-8 > Date: Mon, 29 Sep 2008 23:27:53 GMT > Etag: "936d0ad516a45ffed5a34baa32d10f66" > Expires: Mon, 29 Sep 2008 23:32:53 GMT > Keep-Alive: timeout=15, max=500 > Last-Modified: Mon, 29 Sep 2008 23:27:53 GMT > Ms-Author-Via: DAV > Server: Apache/2.2.8 (Unix) mod_ssl/

Re: TypeError: direct_to_template() got multiple values for keyword argument 'template'

2008-09-15 Thread Cortland Klein
n reg-exp. > > It's unclear what you're trying to do, but you aren't going to achieve > it with an unnamed capturing group in the URL pattern there. > > Regards, > Malcolm -- Cortland Klein <[EMAIL PROTECTED]> +1 408 506 9791 http://pixelcort.com/ 2260 C

TypeError: direct_to_template() got multiple values for keyword argument 'template'

2008-09-15 Thread Cortland Klein
cted.redacted.views.sessionform'), > (r'^success(.*)$', > 'django.views.generic.simple.direct_to_template', {'template': > 'success.html'}), > > ) > -- Cortland Klein <[EMAIL PROTECTED]> +1 408 506 9791 http://pixelcort.com

Re: Nesting inlines with django-admin

2008-09-10 Thread Cortland Klein
tion (this should be inline of PollAnswer) > > PollAnswerTranslation objects should be editable on same page. > > Any hint or solution would be helpful. -- Cortland Klein <[EMAIL PROTECTED]> +1 408 506 9791 Web Developer, Retail Training Apple Inc.

Nokia Guys

2008-09-08 Thread Cortland Klein
At DjangoCon, I met two guys from Nokia, but did not get their cards. If you're out there, let me know; I'd like to get in touch with you. Thanks! -- Cortland Klein <[EMAIL PROTECTED]> +1 408 506 9791 Web Developer, Retail Training Apple Inc. 10101 Bubb Rd. Cupertin

View not passing MEDIA_URL to Template

2008-09-04 Thread Cortland Klein
EST['name'] > > # ... > > return render_to_response('whatsnew/results.html', response) -- Cortland Klein <[EMAIL PROTECTED]> +1 408 506 9791 http://pixelcort.com/ 2260 California Street #13 Mountain View, CA, USA 94040 Alumni, Bus

Re: Random ordering in Templates

2008-09-03 Thread Cortland Klein
return questions > > > You can then call the questions method inside your template when you > have an event: > > {% for question in event.questions %} > question > {% endfor %} > > Ludwig > > > 2008/9/3 Cortland Klein <[EMAIL PROTECTED]>

Re: Random ordering in Templates

2008-09-03 Thread Cortland Klein
x27; : Events.objects.order_by('?'), > } > -- Cortland Klein <[EMAIL PROTECTED]> +1 408 506 9791 http://pixelcort.com/ 2260 California Street #13 Mountain View, CA, USA 94040 Alumni, Business Management <[EMAIL PROTECTED]> San José State University Alumni Technical Adviso

Re: Random ordering in Templates

2008-09-03 Thread Cortland Klein
Can I do that with a Generic View? I'm using date_based.archive_index on an Event model which has many Questions. On Sep 3, 2008, at 11:40 AM, Karen Tracey wrote: > Why not just create the randomized list in the view and pass the > already-randomized list into the template? -

Random ordering in Templates

2008-09-03 Thread Cortland Klein
tom filter, or is there an easier way to accomplish this? -- Cortland Klein <[EMAIL PROTECTED]> +1 408 506 9791 http://pixelcort.com/ 2260 California Street #13 Mountain View, CA, USA 94040 Alumni, Business Management <[EMAIL PROTECTED]> San José State University Alumni Technical

Re: import of mysql in settings.py

2008-08-21 Thread Cortland Klein
an I fix this problem. Any help is appreciated. -- Cortland Klein <[EMAIL PROTECTED]> +1 408 506 9791 http://pixelcort.com/ 529 Water Witch Way San Jose, CA, USA Alumni, Business Management <[EMAIL PROTECTED]> San José State University Alumni Technical Advisor, Entrepreneurial Society <[EM