FORM: How to specify current user as value for a form ForeignKey referencing logged on user

2015-03-08 Thread Ryan Alexander
Hey there, This seems like something that should be simple to do but I'm having a heck of a time with it and google searches don't reference anything that's helping me out. I have a form that a user fills out, and it creates a db row based on the input. Model as below: class Accounts(models.

Re: Doctest isn't running (0.96)

2007-04-19 Thread Ryan Alexander
here """ failed. On 19/04/07, Michael K <[EMAIL PROTECTED]> wrote: > > > > On Apr 19, 10:17 am, Michael K <[EMAIL PROTECTED]> wrote: > > On Apr 19, 9:03 am, "Ryan Alexander" <[EMAIL PROTECTED]> wrote: >

Re: Doctest isn't running (0.96)

2007-04-19 Thread Ryan Alexander
thing be not recognized. I'm a dork. On 19/04/07, Ryan Alexander <[EMAIL PROTECTED]> wrote: > Here's the code at the top of my models.py file: > > from django.db import models > from django.newforms import forms, widgets > from datetime import datetime > # Creat

Doctest isn't running (0.96)

2007-04-19 Thread Ryan Alexander
Here's the code at the top of my models.py file: from django.db import models from django.newforms import forms, widgets from datetime import datetime # Create your models here. WEEKDAY_CHOICES = ( (0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'

How do I get to select multiple options in the admin without resorting to another model? (Django 0.96)

2007-04-17 Thread Ryan Alexander
Here's the code: (it's in models.py) from django.db import models from django.newforms import forms, widgets from datetime import datetime # Create your models here. WEEKDAY_CHOICES = ( (0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'), (5,

Choice newforms field not auto updating...

2007-04-13 Thread Ryan Alexander
I've got this little bit of code in my Views.py file: def get_suite_choices(): for suite in Suite.objects.all().order_by('title'): yield (suite.id, suite.title) class StartSuiteForm(Form): suite = ChoiceField(choices=get_suite_choices()) username = CharField('username',widget

Re: How can I order foreign key items presented in the admin?

2007-04-13 Thread Ryan Alexander
m_in_admin=10) > class Meta: > ordering = ("runorder",) > > On Apr 13, 12:17 pm, "Ryan Alexander" <[EMAIL PROTECTED]> wrote: > > So I have the following bit of model code: > > > > class SuitetoTest(models.Model): > > runor

How can I order foreign key items presented in the admin?

2007-04-13 Thread Ryan Alexander
So I have the following bit of model code: class SuitetoTest(models.Model): runorder = models.IntegerField(core=True) test = models.ForeignKey(Test) suite = models.ForeignKey(Suite, edit_inline=models.TABULAR, num_in_admin=10) So the SuitetoTest model shows up in the Suite admin page

Connection reset by peer error on POST content longer than about 6k chars...

2007-03-13 Thread Ryan Alexander
Function in question: http://dpaste.com/6787/ Simply put, this is a little client program that goes out to the Django server, which tells it which URLS to test and how many times to hit them. It'll average the results, then return the timing info, along with the HTML generated by the render (it

Re: Help with mod_python and apache2 on Edgy Ubuntu with Django 0.95.1

2007-03-07 Thread Ryan Alexander
do you mean that you have a separate > installation that you want to use? > > konstantin > > On Mar 7, 10:56 am, "Ryan Alexander" <[EMAIL PROTECTED]> wrote: > > I've gotten pretty much everything else done, but I can't figure out > > how to

Help with mod_python and apache2 on Edgy Ubuntu with Django 0.95.1

2007-03-07 Thread Ryan Alexander
I've gotten pretty much everything else done, but I can't figure out how to tell mod_python where my django install directory is. The current directory is /opt/perfmanager but I can't figure out what to do past that. I've tried changing the path to contain those directories but it's still not fi