Ayushhhhhhh
I am developing the e-commerce website with Django, So after successful Instamojo (Integration testing) I have a session issue in the local server, after redirecting from Insta mojo test integration portal to a payment success page (local server ), user session logout automatically or any previous user logged in and current user logged out while I am on the payment success page. Session issue might be due to the redirecting from (Django local server) to the Paytm payment portal, But in the payment portal (product price and user name) is being successfully forwarded in integration testing payment page, but after the payment is successfully done and it redirects to the payment success page(local server). At that time user gets logout automatically, although the amount is displayed correctly on the success page. So guys please help me to maintain the session i dont why it is happening please help me current user logged out and any previous user is logged in sometimes it works fine but most off the time it happens
Daniil
Guys, crispy forms doesn't work, what's the problem? I can find it, please help me:( {% extends 'base.html' %} {% load crispy_forms_tags %} {% block content %} <h2>Login</h2> <form method="post"> {% csrf_token %} {{ form|crispy }} <input type="submit" value="Login"> </form> <a href="{% url 'dashboard' %}">Back to dashboard</a> <a href="{% url 'social:begin' 'github' %}">Login with GitHub</a> <a href="{% url 'password_reset' %}">Reset password</a> <a href="{% url 'register' %}">Register</a> {% endblock %} I already install django-crispy-forms and put it in the INSTALLED_APPS list. Unfortunately, it doesn't make any sense...
Daniil
do you get any errors?
I don't gen an error, it just doesn't work. i mean, crispy forms doesn't work. Form has the same style as before and i don't know why
Charly
bootstrap4
did you added the CSS ansJS files of bottstrap?
Anonymous
Can you give me the links
Beka
Guys where I can deploy project and get ssl certificate for free?
Beka
heroku
Is it possible to get ssl certificate for free?
Charly
Is it possible to get ssl certificate for free?
yes, but no sure if heroku provides it
Beka
Yes, that's what I'm not sure, too.
Beka
The project is already on heroku but without certificate. I was thinking to deploy to DigitalOceans but I need domain to get ssl certificate but I don't need domain for test project.
Anonymous
I am trying to return all of the exploit references for all of the exploits associated with the vulnerability. https://dpaste.org/91dy#L85
Ganesh
My django project was working fine. But now as long as user click on any link he is getting logged out. Does any know why it's happening? It's not issue with code as I didn't even change a single line and it was working finely. Update -this morning when I was rechecking it started to work finely without any issue but what was the problem I am not clear . My project guide suggested that it was probably session cookie problem as it was working fine with different browser . But how to prevent this?? And has anyone faced this before?
Anonymous
after installing pgadmin4, when i start the application it is showing fatal error, : "failed to launch the application server, server thread exiting"...how to overcome this problem?
Mukesh
https://stackoverflow.com/questions/66560724/applying-selected-model-data-to-form-django Can anyone please go through this question
Prateek
Is it possible to get ssl certificate for free?
not sure about heroku , but on other like digital ocean you can get it for free
âshîsh
Is it possible to get ssl certificate for free?
Purchase a domain & you will get it for free 🐦
Beka
Purchase a domain & you will get it for free 🐦
I don't need domain.. it's just for test project..
Beka
So, I was thinking if I can get ssl certificate for free without domain.
âshîsh
So, I was thinking if I can get ssl certificate for free without domain.
You can get. But 3rd parties might access your all code.
Bismillakhan
I have a muliple choice field i django Is it possible to customize error message in django drf?
Beka
You can get. But 3rd parties might access your all code.
Yes, please. Can you please let me know? It's absolutely okay to have access to my code, there is no sensitive data.
Neo
Hi how can i get serializers data in an hirarchical structure like getting primary key related data. example: i have a table called mater there i have two records, and one more child table there have primary-foreign key relation and from child table there are 4 more table with primary-foreign relation. i want to get the data from master table to their child tables in an hirarchical manner.
Neo
Use nested serializer
will it gives if i give master table id=1, should give child data of that mster id=1 and for every child rows needs to give associated data
Beka
no
Please with arguments. Why?
Neo
can i get the example link or doc link
🅐🅢🅗🅘🅚
Use the official link
🅐🅢🅗🅘🅚
https://www.django-rest-framework.org/api-guide/relations/
Aslan
def line(request, pk): user = get_object_or_404(User, pk=pk) line = Line.objects.filter(user=user, status='public') data = { 'line': line, 'user_id': user.id, 'username': user.username } if request.user.is_authenticated and request.user.id == pk: data['form'] = NewLine() return render(request, "main/line.html", data)
Beka
You can override the method dispatch in class based view.
DK
Hello. I really need help. If we create 100 articles in django website. How all url can be added automatic.
Renal Eki
hello everybody. can give me reference for learning django channels 3 ?
âshîsh
hello everybody. can give me reference for learning django channels 3 ?
Goto offical docs. Also get some knowledge about python sockets. Would be better
Mohammad
Hi, how can I load the vue module in the Django template script tag? import date from './location' The above code does not work
Neo
https://www.django-rest-framework.org/api-guide/relations/
i have gone through this but didnot worked
Pavel
Hi. What happened in django3? Custom db engine can't be loaded? It's placed in the root of project. It's rising an exception, but django 2 isn't raising
remix
How to make django support multi-language variables ?
remix
こんにちは = "hello world"
remix
こんにちは = django.objects; こんにちは.filter(こん__in="666")
Mirco
How to make django support multi-language variables ?
It's not Django, it's python
mat
How to insert intial value after running migrate function
mat
Create function for that
Can you provide more information
âshîsh
Can you provide more information
Goto offical documents. Everything is there step by step
mat
Goto offical documents. Everything is there step by step
Send me the link about this topic i unfortunately didnt find any
🅐🅢🅗🅘🅚
Mirco
How to insert intial value after running migrate function
just use default into model field before creating the migration
Neo
Whats the error
I did not got the data from child tables
mat
just use default into model field before creating the migration
No i have some initial records that should be inserted before using system apis. And i ve used a json file for that
mat
Which its called fixture i think but doesnt work neither and throws error nor the good practice at all. Sorry for my bad english btw
mat
then use a Data Migration
Yeah it seems more like the proper way i was looking for
Mirco
Yeah it seems more like the proper way i was looking for
https://simpleisbetterthancomplex.com/tutorial/2017/09/26/how-to-create-django-data-migrations.html
🅐🅢🅗🅘🅚
I did not got the data from child tables
Can you send the codes of model and serializer field
🅐🅢🅗🅘🅚
Serializers*
Umar
Choice field is giving keys (1) like Val_Choices(1, "male") How to get male instead of 1
Umar
I am getting these fields from model form like Gender = forms.cleaned_data['Gender'] In view i need it like above mentioned. Then i pass it in context to render in template, where i want it to show as male not 1.. When i check the source code this row is empty in table get_Gender_display doesn't work
Iain
I'm new to this and i want to know how to create website
Umar
Thanks
Iain
How do I use Django to create website
Doragonsureiyā
How do I use Django to create website
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Mukesh
Can anyone reply to my posted question