Ok I actually just figured it out. My issue was that I was calling the
function instead of the actual instance of the form. I got confused
because the variables were named almost identically.
On May 24, 8:27 pm, Alexandra wrote:
> Hi All,
>
> I am somewhat new to Django, although I have been prog
Hi All,
I am somewhat new to Django, although I have been programming in
Python for a while. I installed Pinax and have been working on a site
from one of the starter templates, and have an error I can't seem to
wrap my head around.
Exception Type: TypeError at /models/add
Exception Value: argume
Alex,
Thanks
Ron
On Feb 20, 2:37 pm, Alex Gaynor wrote:
> On Fri, Feb 20, 2009 at 2:34 PM, nixon66 wrote:
>
> > eleom,
>
> > Thanks for the catch with country county in my model.
>
> > On Feb 20, 2:22 pm, eleom wrote:
> > > Well, as the error message says, you must pass a County instance in
On Fri, Feb 20, 2009 at 2:34 PM, nixon66 wrote:
>
> eleom,
>
> Thanks for the catch with country county in my model.
>
> On Feb 20, 2:22 pm, eleom wrote:
> > Well, as the error message says, you must pass a County instance in
> > the argument 'county'. Now you are passing the name of the county,
eleom,
Thanks for the catch with country county in my model.
On Feb 20, 2:22 pm, eleom wrote:
> Well, as the error message says, you must pass a County instance in
> the argument 'county'. Now you are passing the name of the county, not
> the county itself. So, your last line should be
>
> l =
Ahh!!! The light goes on. Thanks for the quick response. One
additional question. How would you handle this if you are typing data
into the admin and wanted to put in the county?
On Feb 20, 2:22 pm, eleom wrote:
> Well, as the error message says, you must pass a County instance in
> the argumen
Well, as the error message says, you must pass a County instance in
the argument 'county'. Now you are passing the name of the county, not
the county itself. So, your last line should be
l = Company(name='xyz corp', address='56 b. street', client='G corp',
city = 'Walla Walla', county=c, dollar_a
On Fri, Feb 20, 2009 at 2:06 PM, nixon66 wrote:
>
> If this is the wrong list to post a newbie question please let me
> know. I'm getting an error message while trying to populate the tables
> created by the models and not sure why. Here are the models
>
> from django.db import models
>
> class C
If this is the wrong list to post a newbie question please let me
know. I'm getting an error message while trying to populate the tables
created by the models and not sure why. Here are the models
from django.db import models
class County(models.Model):
name = models.CharField(max_length=80)
Please have a look at the below link:
http://code.google.com/appengine/articles/pure_django.html
May be it helps you in porting the app from appengine to django.
--rama
On Feb 1, 5:16 am, "Mark.Petrovic" wrote:
> Good day. I'm new here, as well as a new (all of two months of
> experience) Pyth
Good day. I'm new here, as well as a new (all of two months of
experience) Python web app developer.
I'm interested in porting a Google App Engine
"google.appengine.ext.webapp"-based app to a standalone Django app on
another platform. I've ported my data models from GAE to Django, as
well as my
Malcolm Tredinnick escribió:
>
> On Tue, 2008-04-01 at 15:42 +0200, Matias Surdi wrote:
> [...]
>> ¿Is this correct? Isn't it a bit tedious to do this with all views? What
>> if I forget to add the RequestContext thing in a view?
>
> If you don't pass in the parameters that are required, the fu
You can use the django.views.generic.simple "direct_to_template" view
just like you would the render_to_response shortcut - it works the
same except you pass in the request as the first argument:
direct_to_template(request, 'template/index.html')
On Apr 2, 2:42 am, Matias Surdi <[EMAIL PROTECTED
On Tue, 2008-04-01 at 15:42 +0200, Matias Surdi wrote:
[...]
> ¿Is this correct? Isn't it a bit tedious to do this with all views? What
> if I forget to add the RequestContext thing in a view?
If you don't pass in the parameters that are required, the function
won't be able to use them. Surely
Hi,
Suppose I've the following on the top of every page of my application
(in base.html for example):
{% if user.is_authenticated %}
Welcome, {{ user.username }}. Thanks for logging in.
{% else %}
Welcome, new user. Please log in.
{% endif %}
Now, as far as I understand I must ALWAY
Hi Malcolm,
> I would like to see if subProject.parent the first time you test it
> (your first assert()) is exactly the same as after the subProject.save()
> line.
>
I did a bit of debugging and uncovered the following facts. I think
they explain the goings on pretty clearly.
Let us take the s
On Mon, 2007-02-26 at 17:19 +, Manoj Govindan wrote:
> Hi Malcolm,
> After reading your post, I added a couple of assertions.
> 1) Check for subProject.parent immediately after creating the
> subProject object.
> 2) Compare id()s of project and subProject.parent *after saving*
> subProject.
>
Hi Malcolm,
After reading your post, I added a couple of assertions.
1) Check for subProject.parent immediately after creating the
subProject object.
2) Compare id()s of project and subProject.parent *after saving*
subProject.
The test now looks like this:
class ProjectTests(unittest.TestCase):
On Sat, 2007-02-24 at 18:41 +, Manoj Govindan wrote:
> Hi,
> Consider a model and a simple test for the model.
>
> class Project(models.Model):
> name = models.CharField(maxlength = 255)
> parent = models.ForeignKey('self', null = True)
>
> class ProjectTests(unittest.TestCase):
>
Hi,
Consider a model and a simple test for the model.
class Project(models.Model):
name = models.CharField(maxlength = 255)
parent = models.ForeignKey('self', null = True)
class ProjectTests(unittest.TestCase):
def testCreateProjectAndSubProject(self):
project = Project(name
20 matches
Mail list logo