def clean(self):
> super().clean()if
> Feedback.objects.filter(user_id=self.user.pk).count() >= 3:
> raise ValidationError(['You have already left feedback 3 times.'])
>
> ==
>
>
> form = FeedbackForm(request.user, request.POST)
>
>
> On 01/07/1
I have a feedback app in which the user signs in, logs in and gives
feedback. i wish to limit the number of feedbacks a user can give. how to
do this and where? shall I user validation?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
*post-form.html*
{% extends "posts/post_base.html" %}
{% load bootstrap3 %}
{% block post_content %}
{% if not form.instance.pk %}
Create Post
{% else %}
Update Post
{% endif %}
{% csrf_token %}
{% bootstrap_form form %}
{% endblock %}
*models.py*
from django.conf import settings
from
kert wrote:
>
> Can you include your template code? The issue could be in there.
>
> On Sunday, June 24, 2018 at 10:15:50 AM UTC-5, Saloni Kalra wrote:
>>
>> I wish to add radio buttons fill in each parameter of my model and also
>> to convert it to integer on t
I wish to add radio buttons fill in each parameter of my model and also to
convert it to integer on the backend. But somehow its not changing. Kindly
help.
Thanks and regards,
Saloni
*Forms.py*
class PostForm(forms.ModelForm):
class Meta:
fields =
Alright! Thanks much!
On Sun, 24 Jun 2018, 6:56 pm Melvyn Sopacua, wrote:
> On zaterdag 23 juni 2018 21:10:27 CEST Saloni Kalra wrote:
> > Thank you for your reply. I removes all the migrations and dropped the
> > database. Now when I try to make migrations i get the followin
Thanks much!
On Sun, 24 Jun 2018, 5:50 pm Daniel Ale, wrote:
> Great.
>
> On Sun, Jun 24, 2018, 13:18 Saloni Kalra
> wrote:
>
>> Yes it did! Thanks much!
>>
>> On Sunday, 24 June 2018 17:14:31 UTC+5, Daniel Ale wrote:
>>>
>>> Override
Yes it did! Thanks much!
On Sunday, 24 June 2018 17:14:31 UTC+5, Daniel Ale wrote:
>
> Override the get_success_url(self) instead... That will work
>
> On Sun, Jun 24, 2018, 07:13 Saloni Kalra > wrote:
>
>> *DeleteView:*
>>
>> class DeletePost(Lo
*DeleteView:*
class DeletePost(LoginRequiredMixin, SelectRelatedMixin,
generic.DeleteView):
username = self.object.user.username
model = models.Post
select_related = ("user","teacher","subject")
success_url = reverse_lazy("posts:for_user", kwargs={'username':
been swapped out.
HINT: Update the relation to point at 'settings.AUTH_USER_MODEL'.
On Saturday, 23 June 2018 23:25:25 UTC+5, Melvyn Sopacua wrote:
>
> On zaterdag 23 juni 2018 10:52:09 CEST Saloni Kalra wrote:
>
> > https://github.com/salonikalra/feedback
>
>
I am trying to build a feedback application for the teachers by the
students. I have a proxy User that will the student. But I am not able to
assign the user to the feedback model. I am a newbie. Please help.
Thanks and regards,
Saloni
*models.py:*
class User(auth.models.User,
https://github.com/salonikalra/feedback
This is a feedback application for teachers by the students. I have been
constntly getting the following error:
ValueError at /feedback/by/feedback/new
Cannot assign "": "Feedback.user" must be a "User" instance.
Please help.
Thanks.
--
You received this
12 matches
Mail list logo