Muflone
https://pastebin.com/enanZSX2
There it's called add, not add_save
Roman
do you think : " path("add/save/", add_save, name='add_save')," ?
Roman
There it's called add, not add_save
Request URL: http://127.0.0.1:8000/bboard/add/%7B%25%20url%20'add_save'%20%25) The current path, bboard/add/{% url 'add_save' %), didn't match any of these.
mhamed
Hi
mhamed
I have a problem in django
Roman
Show your urls.py again
https://pastebin.com/k2eQ3eyJ
mhamed
When I past the urls of image in my urls in django and when I save make error
Muflone
{% url ... %}
Roman
{% url ... %}
thank you!!
Roman
{% url ... %}
But now i have this mistake : Exception Type: NoReverseMatch at /bboard/add/save/ Exception Value: Reverse for 'by_rubric' with keyword arguments '{'rubriс_id': 1}' not found. 1 pattern(s) tried: ['bboard\\/(?P<rubric_id>[0-9]+)\\/$']
Roman
You did not posted anything about your code
https://pastebin.com/nkmsuU8t https://pastebin.com/0yLqWcCM
Muflone
Show your forms.py
Roman
Show your forms.py
https://pastebin.com/SVDa1ZKy
Anonymous
How can I call same model from model.py into different functions within same views.py file
Anonymous
Of a single app
Anonymous
I tried calling the first function into another function but couldn't achieve the desired result.
Anonymous
Is something needs to be done in html file or model file
Anonymous
Function
Александр
tell me how to pass in restAPI ImageField, if through the postmen form-data norms everything goes, then in raw Post gives 400 until you remove img in json, the link looks like "image": "/static/img/No_photo.jpg",
Anonymous
Hi all, any python freelance work here?
Anonymous
Any one help me
Anonymous
What data type does URL pattern maps
Anonymous
What is the superclass of django form
Anonymous
Help me out guys
Nikolay
What data type does URL pattern maps
You mean int, str, slug, path, uuid?
Anonymous
You mean int, str, slug, path, uuid?
Not that bro list dict set tuple
Nikolay
Not that bro list dict set tuple
Allowed types of urlpatterns?
Anonymous
Allow type of url patterns
Nikolay
Yes bro
As I know, list or tuple, under the hood Django make them dicts, with name as key. But I’m not sure
Nikolay
What is the superclass of django form
If you mean parent, Form inherits from BaseForm
Space
Hello fellas
Space
I have a form and a model, nothing is wrong there, but my html isnt showing form. despite me adding {% csrf_token %} {{subscriber_form.as_p}}
Space
its a simple subscription form, which takes names and email
Space
What and where should I check to fix this?
Space
Change the name of my form then?
Nikolay
Change the name of my form then?
how do u send it? if something like this: return render(request, 'template.html', {'subscriber_form': SubscriberForm} subscriber_form.as_p is the right way, otherwise probably form sends in context as form
Space
hmm, let me check if this works
Space
I wonder if telegram allows screen sharing
Nikolay
I wonder if telegram allows screen sharing
use dpaste.org to show view code
Space
Nikolay its here https://dpaste.org/fThq
Nikolay
Nikolay its here https://dpaste.org/fThq
you declare the form only when the method is post. You should send something when the method is get
Space
so my empty form wont show on page, unless I give it get method, right?
Nikolay
so my empty form wont show on page, unless I give it get method, right?
something like this https://dpaste.org/xFVp and you shouldn't use underscore in class name, just PascalCase
Space
Sure
Anonymous
Thank you
Space
im still working on that issue
Anonymous
you only create the form on the post method, you should define the GET if and create the form in there too
Nikolay
im still working on that issue
here is an example from django docs https://docs.djangoproject.com/en/3.0/topics/forms/#the-view
Anonymous
and maybe checkout the class FormView
Space
form isnt being shown on the page like this pic below
Space
https://media.geeksforgeeks.org/wp-content/uploads/20191114130318/django-form-as-p-render.png
Space
Nothing,only submit button is shown
Nikolay
Nothing,only submit button is shown
show me you view and template with changes
Anonymous
Hi in our company there is openings for Django/ python developer with 2 years experience work location is bangalore any one interested message me
Aditya
Which database is best for django.. MySQL or postgresSQL
Mostly depends on Use case, as postgres supports geo data and its operations , Data types supported for postgres are extensive, also security wise ,postgres if preferred for bigger projects.
Hardik
Can anyone tell me how to my host my website live . I am using django and currently using my local server
Mimi Khalid
Hi guys, Im Mimi and I'm new here. I am currently developing system that used django-viewflow pro as the engine for workflow. Does anybody here familiar with django viewflow? I need some help 😄
Anonymous
I want to learn Django And help
Doragonsureiyā
I want to learn Django And help
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Anonymous
Thanks
Baku
How to get id of post request?
Doragonsureiyā
How to get id of post request?
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you. Include details such as libraries, platform, modules, etc. and also show your code using any pasting service.
Nikolay
How to get id of post request?
If you mean how to get arguments from pattern like /<int:id>/ it should be in kwargs of view
Nayan
Hi can someone please help me with , how should i get URL Parameter to the class based view. What i am trying to do is getting the parameter from URL , AND then want to filter itbin queryset and with the help of django tables 2 want to display all my data into table .
Nayan
I am getting error - got an unexpected keyword argument serial number
Nikolay
I am getting error - got an unexpected keyword argument serial number
before use it in queryset make it integer, cause its a string in url
Nayan
My url pattern - url('results/(?P<serialnumber>.+)), views_class.results.as_views(), name='results',
Nikolay
My url pattern - url('results/(?P<serialnumber>.+)), views_class.results.as_views(), name='results',
def get_queryset(self, **kwargs): serialnumber = self.kwargs.get('serialnumber') if serialnumber: serial_number = int(serialnumber) result = ModelName.objects.fiter(serialnumber=serialnumber) return result
Nayan
before use it in queryset make it integer, cause its a string in url
How to do that in class based view i am doing Def get_queryset(self,**kwargs): Return model.objects.filter(serialnumber= self.kwargs['serialnumber'])