Groot
But i want only one field data to be shown after user response another one will load
Groot
Groot
Any idea for that?
on
WordPress uses yoast seo plugin for seo. Which package i can use for django for seo purpose
Groot
Okay wait
Kiarash
Mubtasim
Can anyone please tell me how to redirect back to previous page or dynamically after social login?
William
Mubtasim
It always Redirects me to LOGIN_REDIRECT_URL ='/' at seetings.py file while i want to redirect it to the previous page... not at single home page.
William
Mubtasim
The Page's url takes post.id and post.title... Those are not same for all posts...
Suppose one user is reading a single post and then he wants to login from navbar login... The post has an unique url like other posts... After login he redirects back to home page or a single page... I want to redirect him back to that post
Frank
https://stackoverflow.com/questions/16750464/django-redirect-after-login-not-working-next-not-posting
Groot
Can you share the code. It will be easy for me to answer.
<section id="categories" class="categories-area pt-170 pb-170">
<div class="container">
<div class="row">
<div class="col-xl-8 col-lg-10 mx-auto">
<div class="section-title text-center">
<h2 class="wow fadeInUp" data-wow-delay=".2s">MOCK TEST</h2>
<p class="wow fadeInUp" data-wow-delay=".4s"></p>
</div>
</div>
</div>
</div>
{% for qu in qu %}
<div class="container">
<div class="row">
<div class="col-xl-6 col-lg-7 col-md-10 mx-auto">
<div class="section-title text-center">
<h2 class="mb-15 wow fadeInUp" data-wow-delay=".2s">{{ qu.question_text }}</h2>
<ul class="wow fadeInUp" data-wow-delay=".4s">
<li>{{qu.choice1}}</li>
<li>{{qu.choice2}}</li>
<li>{{qu.choice3}}</li>
<li>{{qu.choice4}}</li>
</ul>
</div>
</div>
</div>
{% endfor %}
{% endblock %}
Mubtasim
Social allauth login**
Mohammad
django.db.utils.ProgrammingError: type "jsonb" does not exist
LINE 1: ...LL, "further_details" text NOT NULL, "attributes" jsonb NOT ...
How can I fix this error?
I am using the psql database
I read somewhere that JasonB field could help but did not solve the problem. I have asked this question several times but have not received an answer.
I welcome any answer that can help me even a little to solve this problem
William
William
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like:
- https://del.dog
- https://dpaste.org
- https://linkode.org
- https://hastebin.com
- https://bin.kv2.dev
If you posted a wall of text, go back and delete it.
Anonymous
Eilia
.
Hi, can anyone help please. How to store post with likes, and how to know if user who's send the request liked post or not?
Conditional elector of HRE
Hello everyone! Why isn't the django form displaying? Here is the views.py code - https://pastebin.com/r1tJ54Kh, here is the registration.html code - https://pastebin.com/9R4ymWAw and here is the forms.py code - https: / /pastebin.com/Q0pdryr7
I indicated in the form
{% csrf_token%}
{{form.as_ul}}
{{form}} doesn't work either
Глеб
How to get attributes values using model id?
VBELLO TECH
Irfan
Anyone help me to get data from react form in django
William
.
سلام به همه دوستان
چرا این کد خروجی از بهم نمیده؟؟
.
سلام به همه دوستان
چرا این کد خروجی از بهم نمیده؟؟
class myrouter(object):
def init (self,routername,model):
self.routername = routername
self.routername = model
def print_router(self,date):
print("the router model is:"),self.model
router1=myrouter("R1","2900"
Глеб
William
example?
ModelName.objects.get(id=1)
Глеб
William
Глеб
William
Yes
Try using the above method
Emre
Hi, anyone knows that how can i save base64 format image as an jpg or png and return it to vue as an image?
Глеб
Anonymous
William
The
What's the cheapest way to host a Django project for a client
Irfan
Sergio
Irfan
Глеб
Share the code.
What code? URL.objects.get(id='55') returns URL object (55)
I need get value of variable. Value of variable i request as form
Sumit
Hi, I need one help. I have to upload more than one image for a product, number of images is not fixed. How can I write a model for it.
Sumit
class Product(models.Model):
name = models.CharField(max_length=100)
product_image = models.ImageField(upload_to='product_image/', null=True, blank=True)
price = models.PositiveIntegerField()
description = models.TextField()
def __str__(self):
return self.name
Sumit
This is for one image per product , but I need multiple images for one product.
William
William
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like:
- https://del.dog
- https://dpaste.org
- https://linkode.org
- https://hastebin.com
- https://bin.kv2.dev
If you posted a wall of text, go back and delete it.
William
Share your code through one of the above options!
William
Глеб
Глеб
William
Share with me your models, views code.
William
William
What is the output you got?
Глеб
Share with me your models, views code.
from django.db import models
class URL(models.Model):
full_url = models.CharField(max_length = 200)
short_url = models.CharField(max_length = 10, default='')
Глеб
William
Tell me what you get when you pass URL.objects.all()
Глеб
<QuerySet [<URL: URL object (36)>, <URL: URL object (37)>, <URL: URL object (38)>, <URL: URL object (39)>, <URL: URL object (40)>, <URL: URL object (41)>, <URL: URL object (42)>, <URL: URL object (43)>, <URL: URL object (44)>, <URL: URL object (45)>, <URL: URL object (46)>, <URL: URL object (47)>, <URL: URL object (48)>, <URL: URL object (49)>, <URL: URL object (50)>, <URL: URL object (51)>, <URL: URL object (52)>, <URL: URL object (53)>, <URL: URL object (54)>, <URL: URL object (55)>, '...(remaining elements truncated)...']>
William
store get() in a variable and use for loop on that variable and print
Eilia
William
Don't do URL.objects.all() now.
William
Try URL.objects.get()
William
If you want multiple data with some similarities then use filter()
William
Try URL.objects.get(id=55)
Глеб
William
William
Try the above code.