Re: contenttypes and dumpdata options

2011-02-01 Thread Preston Timmons
Hi JD, Yes, using natural keys will allow you to serialize models that use the contenttypes framework. You can read about this feature here: http://docs.djangoproject.com/en/dev/topics/serialization/#natural-keys Preston On Jan 29, 1:59 pm, jd wrote: > hello, > What's the

Re: Styling help_text

2011-02-01 Thread Preston Timmons
Hi Scot, Unfortunately, the patch to that ticket was committed after 1.2 was released. That feature isn't available until 1.3 or in trunk. What you see in the docs is an error. The original patch didn't include an update there. I created a ticket to have the docs corrected.

Re: Adding a field to a form during runtime

2009-03-19 Thread Preston Timmons
Hi Marek, I think that your problem is that the make_car_form function returns a form class rather than an instance of that class. Once you have the class you still need to make an instance of it. Something like this might work: form_class = make_car_form(True) carForm = form_class() Preston

Re: Testing

2009-03-18 Thread Preston Timmons
Hi Filip, The Django test runner looks for tests in two places in an application--the models.py file and an optional tests.py file. If you want to run tests for your views you can move your tests into a file called tests.py in your application. An example of testing a view with doctests can be

Re: override render_to_response

2009-03-16 Thread Preston Timmons
I am wondering if render_to_response is really the proper function you are looking for. For instance, here is a simple view that returns json using HttpResponse without need of a template: import simplejson from django.http import HttpResponse def output_json(request): data = [

Re: Saving model with raw=True

2009-03-16 Thread Preston Timmons
if I wasn't missing something simple. Preston On Mar 16, 5:59 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Mon, Mar 16, 2009 at 6:55 PM, Preston Timmons > <prestontimm...@gmail.com>wrote: > > > > > > > At one time it seems there was an intention to ha

Saving model with raw=True

2009-03-16 Thread Preston Timmons
At one time it seems there was an intention to have the save method on models accept a keyword argument named raw which would allowed the model to be saved without pre-processing. This argument is available in the save_base method but not available in the save method. Am I right to conclude that