Hello everybody
I have a problem:
NoReverseMatch at /update-orders/12
Reverse for 'update_order' with arguments '('',)' not found. 1 pattern(s)
tried: ['update\\-orders/(?P[0-9]+)$']
Request Method: GET
Request URL: http://192.168.0.249:8000/update-orders/12
Django Version: 3.0.5
Exception Typ
I have some models classes. And some classes have bounding fields with
another class. Each class have the field - author. I whould like that for
each user the form bounding field shows only those data which was created
these authors.
For example:
class “TypeJob” has field “author”.
User Jhon
я не совсем понял
class Meta:
model = Order
fields = '__all__'
name_job = forms.ModelMultipleChoiceField(queryset=None)
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
qs = TypJob.objects.filter(author__id=request.user.id)
ld('name of order', max_length=200)
вторник, 28 апреля 2020 г., 18:41:25 UTC+2 пользователь Antje Kazimiers
написал:
>
> the form doesn't know the request only the view does. how does your view
> function look like?
> On 4/28/20 5:57 PM, Sergei Sokov wrote:
>
hend hend Не работает, но и ошибку не выдает. Что-то нужно передать в
класс формы?
It doesn't work. And it doesn't show an error (
class OrderNewBigPrintView(LoginRequiredMixin, CustomSuccessMessageMixin,
CreateView):
model = Order
template_name = 'new_order_bp.html'
form_class = Or
please could you see this
https://ru.stackoverflow.com/questions/594743/forms-modelchoicefield-%d0%9a%d0%b0%d0%ba-%d0%bf%d0%be%d0%bb%d1%83%d1%87%d0%b8%d1%82%d1%8c-%d1%81-%d0%bf%d0%be%d0%bc%d0%be%d1%89%d1%8c%d1%8e-queryset-name-model-objects-filt
how to write this "form = KommpredForm(request.POS
+2 пользователь hend hend написал:
>
>
>
> вторник, 28 апреля 2020 г., 19:56:37 UTC+3 пользователь Sergei Sokov
> написал:
>>
>> forms.py
>> class OrderForm(forms.ModelForm):
>> class Meta:
>> model = Order
>> name_job = forms
)
> # set 'name_job' queryset
> self.fields['name_job'].queryset = TypJob.objects.filter(
> author__id=user.id)
>
> среда, 29 апреля 2020 г., 17:19:41 UTC+3 пользователь Sergei Sokov написал:
>>
>> hend hend спасибо большое!
>> Работае
gt;
> среда, 29 апреля 2020 г., 19:49:45 UTC+3 пользователь Sergei Sokov написал:
>>
>> без self такая ошибка
>>
>> 'OrderForm' object has no attribute 'user'
>>
>>
>> среда, 29 апреля 2020 г., 17:56:10 UTC+2 пользователь hend hend на
gs, **kwargs)
> # set 'name_job' queryset
> # user.id without self
> self.fields['name_job'].queryset = TypJob.objects.filter(
> author__id=user.id)
>
>
> четверг, 30 апреля 2020 г., 11:34:28 UTC+3 пользователь Sergei Sokov
> нап
n self.fields:
> self.fields[field].widget.attrs['class'] = 'form-control'
>
>
> четверг, 30 апреля 2020 г., 15:46:43 UTC+3 пользователь Sergei Sokov
> написал:
>>
>> так работает, но если я добавляю вот это для редактирования ото
7;class'] = 'form-control'
> # set 'name_job' queryset
> self.fields['name_job'].queryset = TypJob.objects.filter(
> author__id=user.id)
>
> четверг, 30 апреля 2020 г., 20:00:57 UTC+3 пользователь Sergei Sokov
> написал:
>>
>
super().__init__(*args, **kwargs)
> # set class attrs
> for field in self.fields.values():
> field.widget.attrs['class'] = 'form-control'
> # set 'name_job' queryset
> self.fields['name_job'].queryse
I have two forms in one template, but one of them doesn't have data to my
database.
Why does it happen and how to fix it?
When I fill out the Pack form and press "submit" the terminal shows that:
"POST" /sklad HTTP/1.1" 200 9937
This data doesn't save to my database.
When I fill out the Sklad
I guessed about it.
But I dont know how to do that.
понедельник, 4 мая 2020 г., 18:42:10 UTC+2 пользователь Sherif Adigun
написал:
>
> Your code is working perfectly. Just that you need to remember that the
> view has its model set to Sklad. Hence, when you called super() on
> form_valid, only
Thank you for answer.
I have this error when I try save data for SkladForm, when I press submit
Request Method: POST
Request URL: http://192.168.0.249:8000/sklad
Django Version: 3.0.5
Exception Type: KeyError
Exception Value:
'pack_form'
Exception Location: /var/workspace/myp4/webprint/print/vie
I have this error when I try save data for SkladForm, when I press submit
Request Method: POST
Request URL: http://192.168.0.249:8000/sklad
Django Version: 3.0.5
Exception Type: KeyError
Exception Value:
'pack_form'
Exception Location: /var/workspace/myp4/webprint/print/views.py in
form_valid,
():
> pack_form.instance = self.object
> pack_form.save()
>
>
> And replace with print(pack_form)
>
>
> Then let's see what it's printing in the console
>
> On Tue, May 5, 2020, 8:30 PM Sergei Sokov >
> wrote:
>
>> I
my zoom
Sergey Sokov
среда, 6 мая 2020 г., 10:37:42 UTC+2 пользователь Sergei Sokov написал:
>
> I can but my english is very bad.
>
> среда, 6 мая 2020 г., 10:08:47 UTC+2 пользователь Sherif Adigun написал:
>>
>> Can you come to zoom so we fix this ones and for all
>
I can but my english is very bad.
среда, 6 мая 2020 г., 10:08:47 UTC+2 пользователь Sherif Adigun написал:
>
> Can you come to zoom so we fix this ones and for all
>
> On Wed, May 6, 2020, 8:13 AM Sergei Sokov >
> wrote:
>
>> [image: kwargs.JPG]
>> B
y 4, 2020 at 4:37:39 PM UTC+1, Sergei Sokov wrote:
>>
>> I have two forms in one template, but one of them doesn't have data to
>> my database.
>> Why does it happen and how to fix it?
>>
>> When I fill out the Pack form and press "submit" the term
I am ready
среда, 6 мая 2020 г., 12:35:28 UTC+2 пользователь Sherif Adigun написал:
>
> ok. send a reply when you are available.
>
> On Wed, May 6, 2020 at 11:13 AM Sergei Sokov > wrote:
>
>> I can a little bit later, ok?
>> I think in 2 hour
>>
>
Thank you very much!!
You are best!!!
среда, 6 мая 2020 г., 15:09:39 UTC+2 пользователь Sherif Adigun написал:
>
> https://us04web.zoom.us/j/79500561313?pwd=TnIzekVTMU0xRDNsaGpaS0kxQlhTdz09
>
>
> JOIN NOW
>
--
You received this message because you are subscribed to the Google Groups
"Django
I need:
1) If a user has created a object of the class by a form, then he sees the
button which calls the webpage of the object detail.
2) If a user didn't create a object of the class, but another user did it,
then he sees the button which calls this form to create a object and the
user wi
Hi
I would like abort a loop in my template.
How to create custom tag - break for tamplate?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr
я
{% endif %}
суббота, 16 мая 2020 г., 20:05:01 UTC+2 пользователь Sergei Sokov написал:
>
> Hi
> I would like abort a loop in my template.
> How to create custom tag - break for tamplate?
>
--
You received this message because you are subscribed to the Google G
I have the path in the web browser like this
http://192.168.0.178:8000/customers-orders/37/customers-orders-date/?datefilter=06%2F14%2F2020+-+06%2F26%2F2020
How to get this path to my views.py for to work with it?
--
You received this message because you are subscribed to the Google Groups
"Dja
I would like to use a current url path in my views.py
понедельник, 8 июня 2020 г., 14:25:25 UTC+2 пользователь Rupesh Dahal
написал:
>
> Can you please elaborate your problem.
>
> On Monday, June 8, 2020 at 12:26:12 AM UTC+5:45, Sergei Sokov wrote:
>>
>> I have the path
; On Tue, Jun 9, 2020, 6:41 PM Sergei Sokov >
> wrote:
>
>> I would like to use a current url path in my views.py
>>
>> понедельник, 8 июня 2020 г., 14:25:25 UTC+2 пользователь Rupesh Dahal
>> написал:
>>>
>>> Can you please elaborate your proble
Hi, I have same problem.
I am doing same like did you but it doesnt work. POST doesnt work.
Could you please hrlp me with it?
среда, 6 мая 2020 г. в 12:47:00 UTC-1, adigun...@gmail.com:
> You are welcome.
>
> I'm happy to help
>
--
You received this message because you are subscribed to the Go
Thank you so mach!
четверг, 4 февраля 2021 г. в 14:13:24 UTC-1, wne...@gmail.com:
> https://riptutorial.com/django/example/16667/one-view--multiple-forms
> https://pylab.ru/django-dve-formy-v-odnom-view/
>
>
> четверг, 4 февраля 2021 г. в 16:44:54 UTC+3, soko...@gmail.com:
>
>> Hi, I have same
I am trying to send an email when a user fills out a form on my site.
Everything works on my local server, letters are sent and I am got them.
On a remote timeweb.com server with the same settings, letters are not sent.
Tried DEBUG = False and True
I tried different mail services: gmail, mail, yand
pam, I have tried different email services
I switched the security allow less secure app on
вторник, 23 февраля 2021 г. в 12:05:27 UTC+1, anubhavg...@gmail.com:
> you should be using app password instead of less secure option
>
> On Tue, Feb 23, 2021 at 3:36 PM Sergei Sokov wrote:
>
This code works on my local server, but doesnt work on the hosting. What
could be the problem?
import _thread
def email_index(*args):
server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login('k...@gmail.com', 'pas')
try:
server.sendmail('k...@gmail.com
This code is working
server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login('k...@gmail.com', 'pas')
try:
server.sendmail('k...@gmail.com', 's...@gmail.com',
body_mes.encode('utf-8')) print('ok')
except:
print('An error occurred when trying to
I put the google recaptcha V2 to my django project form. It looks like
working, but if I leave empty the recaptcha checkbox my form is sent still.
forms.py
from django import
forms from captcha.fields
import ReCaptchaField
from django.forms import Textarea
from .models import *
class CustomerForm
aya Garcia
> wrote:
>
>> Camarada Sokov:
>> Your code is very difficult to understand at first sight. I did not know
>> about ReCaptchaField().
>> But, is interesting to learn something new.
>>
>> Recards,
>>
>> Gabriel Araya Garcia
>> GM
37 matches
Mail list logo