We are having a huge issue finding a good java-like testing
framework. In java you can say 'run all classes in this folder'is
this possible with python/django?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
Is it possible to do:
class GoalTag(models.Model):
goals = models.ManyToManyField(Goal, null=True)
The reason why i ask is that a goal can have many tags, and a tag can
belong to many goals. However, after a tag is input and a user
deletes a goal, the tag should still remain in the
I am trying to set a user on a model, on the back-end.
u = request.user
g = Goal()
g.user = u
form = GoalForm(request.POST, g)
I am getting the following error:
goal.user_id may not be NULL
--
You received this message because you are subscribed to the Google
; On Feb 6, 7:00 pm, kamilski81 <kamilsk...@gmail.com> wrote:
>
> > Basically I am doing the following:
>
> > u=User.objects.get(username="kamilski81")
> > goal = Goal(user=u)
> > form= GoalForm(request.POST, goal)
>
> > and get this error
Basically I am doing the following:
u=User.objects.get(username="kamilski81")
goal = Goal(user=u)
form = GoalForm(request.POST, goal)
and get this error:
(1048, "Column 'user_id' cannot be null")
FROM THE front-end...
Kamil
On Feb 5, 10:43 pm, Dylan Evans <
fine for me, you may want to try get since it will throw an exception
> if there is no matching user. Then you know the problem is elsewhere.
>
>
>
> On Sat, Feb 6, 2010 at 11:30 AM, kamilski81 <kamilsk...@gmail.com> wrote:
> > I would like to save a form by doin
I would like to save a form by doing the following:
#Goal has a User ForeignKey (django.contrib.auth.models.User)
-
class GoalForm(ModelForm):
class Meta:
model = Goal
---
class Goal(models.Model):
user = models.ForeignKey(User, editable=False)
--
view.py
I have done the tutorial on the site, are there any other recommended
readings?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
8 matches
Mail list logo