Help with Test Client, Templates and Context

2009-07-29 Thread mviamari
I'm trying to use the test client to verify my views, but when I check the templates and contexts I get 'None' returned instead of the context dict or the template. I do get the correct content and status code however. I was hoping someone could give me some tips. Here is some example code: #v

Re: Help with Test Client, Templates and Context

2009-07-30 Thread mviamari
On Jul 30, 12:40 am, Karen Tracey wrote: > On Thu, Jul 30, 2009 at 12:06 AM, mviamari wrote: > > > I'm trying to use the test client to verify my views, but when I check > > the templates and contexts I get 'None' returned instead of the > > context dict

Custom Manage.py Commands

2009-07-30 Thread mviamari
I'm trying to create a custom manage.py command for my project. The example in the documentation only shows how to do this for custom commands inside of an app. Is it possible to do the same at the project level? I'm currently specifying a Command class in a module file within a management/comm

Re: Custom Manage.py Commands

2009-07-30 Thread mviamari
On Jul 30, 5:24 pm, Malcolm Tredinnick wrote: > On Thu, 2009-07-30 at 17:18 -0700, mviamari wrote: > > I'm trying to create a custom manage.py command for my project.  The > > example in the documentation only shows how to do this for custom > > commands inside of an

Dynamic Choices for ChoiceField

2009-07-31 Thread mviamari
Hello, I'm trying to make a form for data entry into my database that uses ChoiceFields for foreign keys. Obviously, the ideal choice would be ModelChoiceField, however I'm not using the django ORM, so I've assumed that's not going to work (I'm using Elixir/SQLAlchemy). I originally set the cho

Re: Dynamic Choices for ChoiceField

2009-08-01 Thread mviamari
On Jul 31, 7:37 pm, Malcolm Tredinnick wrote: > On Fri, 2009-07-31 at 16:31 -0700,mviamariwrote: > > Hello, > > > I'm trying to make a form for data entry into my database that uses > > ChoiceFields for foreign keys.  Obviously, the ideal choice would be > > ModelChoiceField, however I'm not usin

Load Templates from outside TEMPLATE_DIRS

2009-09-11 Thread mviamari
I'm trying to load a template file from outside of TEMPLATE_DIRS, i.e. the template file does not reside in any of the template directories specified in TEMPLATE_DIRS. Does anyone know if this is possible? I tried just specifying a path: i.e.'../../new_dir/template.html' but that doesn't seem to

Re: Load Templates from outside TEMPLATE_DIRS

2009-09-12 Thread mviamari
The template in question is to format my test results, and I didn't want to have lump it in with the production templates, or have the template directory permanently attached to the TEMPLATE_DIR So instead I've just loaded a new settings file with a modified TEMPLATE_DIR before I do my tests. Wo

PID/processes for runserver

2009-10-08 Thread mviamari
I've written a script to launch a server, run some tests and then kill the server afterwards. The problem I'm having is that the PID returned from the subprocess call is not the same as the PID needed to kill the server. Is there any way to get the runserver command to run with a single process?

Rendering Group Labels for Checkboxes and Radio Groups

2009-11-01 Thread mviamari
Hi, When I render a CheckBoxGroup or a Radiobox group and I apply a label to whole widget (independent of the labels for each of the choices), I get something like this: Group Label The problem is that because the top label has the attribute "for='element_0'" if you click on it, it activat