Anton
Hello! How i can check in template dose my request.path == url 'order' if url has pk parameter
B
how to save Date with AM and PM through postman any special settings ?
Alok
I am adding mongodb atlas using djongo engine as database. It is showing SSL: CERTIFICATE_VARIFY_FAILED. certificate has expired
Alok
do not use expired certificates
In which folder, I can find that expired certificate
Alok
Where is that certificate?
Mr. Azaad
Hello Guys I just create a form using "UserCreationForm" and now I want to add HTML class to "UserCreationForm's" attributes Do anyone knows how to do it
Mr. Azaad
class SignUp(UserCreationForm): class Meta: # password1 = forms.CharField(widget=forms.PasswordInput(attrs={'class': "form-style"})) model = User fields = ('username','email','password2') widgets = { 'username': TextInput(attrs={'class': 'form-style', 'placeholder': 'User Name'}), 'email': forms.EmailInput(attrs={'class': 'form-style', 'placeholder': 'Email'}), }
Mr. Azaad
password1 is defined in parent class (UserCreationForm)
Mr. Azaad
I want to give class name to it
Roman
Hello! What is a proper way to do regular tasks in Django related to ORM? For example, if I want to add a new user every 10 minutes based on some local txt.
Eric
Hello! What is a proper way to do regular tasks in Django related to ORM? For example, if I want to add a new user every 10 minutes based on some local txt.
"Every 10 minutes" is a scheduled task. Use celery and celery-beat. You can create a celery beat task to just call a function that contains something like User.objects.create(**user_dict)
Meer
For frontend using html css js jquery and react js and for backend using django Is it good for fullstack development Or It's a perfect combo or Not please help me.
Meer
hi, i have an error in django. whenever i try to go to contact page from about page by clicking on navbar, it's getting 'about/contact/' instead of 'contact/'. Am i missing something in url mapping or in views or template? Can anyone help please?
you can give a name to your app like {app_name = your_app_name} in app urls then if you want to trigger then with the help of url pattren name you call the url for calling url just do "{% url 'your_app_name:url_pattren_name' %}"
Anonymous
Guys can anyone know how to set Banking system api with django rest framework
user
Can anyone tell which python topics are there in Django I'm beginner Thanks in advance
Make a website of ur choice by googling and django tutorial from codecamp.org videos and u will learn by urself
Pravin
Please refer a video or blog for deployment in django
ARBAAB
Please refer a video or blog for deployment in django
geekyshows YouTube channel best for django tutorial
Mr Sourav
<div class="hero-wrap js-fullheight" style="background-image: url(static/images/xbg_5.jpg.pagespeed.ic.ciLQ73c4ji.jpg);">
Mr Sourav
<div class="hero-wrap js-fullheight" style="background-image: url(static/images/xbg_5.jpg.pagespeed.ic.ciLQ73c4ji.jpg);">
is there any way to rendering this image dynamically? like {% static "image_path" %}? i can render the images with a href but not with inline css...
Mr Sourav
it's work?
yes bro...it's working fine...
Mr Sourav
but as this is not a complex website till now so i haven't use that reverse method...
Mr Sourav
first you load static then try this way {% loadstatic %}
it's on the top of the page btw...i have to write it anywhere else?
Mr Sourav
Denis
index.html ddddddd {{ id }} dddddddd views.py def detail2(request): template = loader.get_template('index.html') context = {'id', str(id)} return HttpResponse(template.render(context, request))
Denis
why i'm geting Exception Value: context must be a dict rather than set. error?
Maxim
thanx :)
in general, i would recommend using dict(id=str(id)) instead, but that's a matter of taste
Aegon
Hi everyone, I'm just learning django. I'm building an app where users will have to pay per post ( there will be different plan) and I'm not sure how to go about it. Please help. Thanks
ْ
convert django code to php code for larval Is that possible?? Please forward the answer to me
Charly
convert django code to php code for larval Is that possible?? Please forward the answer to me
Manually yes, and I mean you need to code it by yourself not with a tool
Aegon
Lol
Марфа
Hlo
Марфа
I am trying to send headers in Django rest framework but getting error can any one help me
Марфа
raise InvalidHeader("Value for header {%s: %s} must be of type str or " requests.exceptions.InvalidHeader: Value for header {wsgi.input: <django.core.handlers.wsgi.LimitedStream object at 0x0000029E514A7580>} must be of type str or bytes, not <class 'django.core.handlers.wsgi.LimitedStream'>
Anonymous
Please enter the correct email and password for staff account .note that both fields may be case sensitive ..show after successfully create superuser..please help me ..cannot login in admin panel
Anonymous
path('api/', include((router.urls, 'restaurant'), namespace='restaurant')) please explain i haven't created any router app or urls inside it, etc. Please explain all parameters used her
Bibek
remote procedure call in django??
Bibek
anyone here who work in django microservice?
Kishor
anyone know to use chartjs in django
Doragonsureiyā
anyone know to use chartjs in django
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Kishor
how to take chartjs data into django html page
Kishor
how to pass dynamic data in chart in django
Ngeene
path('api/', include((router.urls, 'restaurant'), namespace='restaurant')) please explain i haven't created any router app or urls inside it, etc. Please explain all parameters used her
are you using a modelview set? what error are you facing as I don't quite understand. also i noticed you didn't properly enclose the parenthisis so maybe try path('api/', include(router.urls), there needs to be an app called router
Anonymous
When using djangorestframework-camel-case package, how do you handle a case where the response needs a key like appSessionID as opposed to appSessionId which would be what the parser really generates.
Klepshydra
Hi! I want to extend the built-in method EmailMessage.send(), i need to execute code after each send, is that possible?
ꪉꫝꪖꪹᦋꪖꪜ
It's just a coincidence i guess😅
Klepshydra
You can subclass it as usual and then override the method. As usual.
I have a large codebase and msg.send() is widely used, I should "refactor" all the code to do this
Alex
You can use refactoring tools of you IDE for that.
Klepshydra
I know, but this can be source of errors
Klepshydra
so it is not possible to extend a builtin method :(
Alex
Then you had to write unittests before that. It's how software is developed
Alex
so it is not possible to extend a builtin method :(
It is possible, but I don't recommend that way.
Klepshydra
I am a developer for this company, i did not start this project
Anonymous
Always a good idea to wrap code like that in a function. Then all you need to change is the function itself.
Anonymous
also helps with testing too ig
Klepshydra
Always a good idea to wrap code like that in a function. Then all you need to change is the function itself.
I know, but the guys who wrote before me didn't have that brilliant idea
Klepshydra
and now this is the situation
Klepshydra
in my mind sould exist a CustomMail wrapper object
Anonymous
in my mind sould exist a CustomMail wrapper object
Maybe you could just change the mailing backend and implement it there
Anonymous
If you need to change how emails are sent you can write your own email backend. The EMAIL_BACKEND setting in your settings file is then the Python import path for your backend class.