zor
Charly
Kene
Kene
Charly
zor
Charly
Charly
Charly
Did you read the documentation?
Kene
Charly
runt he script?
zor
Hasan
hi
I have some data in my table
each data has date_time
I want to delete the records which passed more than 2 minutes from storing date time
how can I do that?
MySQL
django
Kene
Berkan
How can I add to cart without refreshing the page in my django project, now the add to cart process is working, but the whole page is suddenly refreshed.
Vasily
Hello, could you help me with jinja2, I have a dictionary like this:
Context = {
'title' : 'Main page',
'apps': {'blog' : ['1', '2','3'],
'user' : ['4','5','6']},
}
I'm trying to get:
blog
1
2
3
user
4
5
6
But i Have:
blog
b
l
o
g
user
u
s
e
r
So, the problem is no access to list, methods items(), iteritems() Don't work.
My code is:
{% for app in apps %}
<p>{{ app }}</p>
{% for item in app %}
  <p>{{ item}}</p>
{% endfor %}
{% endfor %}
.
cj
Hello, could you help me with jinja2, I have a dictionary like this:
Context = {
'title' : 'Main page',
'apps': {'blog' : ['1', '2','3'],
'user' : ['4','5','6']},
}
I'm trying to get:
blog
1
2
3
user
4
5
6
But i Have:
blog
b
l
o
g
user
u
s
e
r
So, the problem is no access to list, methods items(), iteritems() Don't work.
My code is:
{% for app in apps %}
<p>{{ app }}</p>
{% for item in app %}
  <p>{{ item}}</p>
{% endfor %}
{% endfor %}
why jinja2?
also it should work with:
{% for app in apps.blog %}
<p>{{ app }}</p>
{% endfor %}
KD
how to create custom login authentication? samplecode send me
Doragonsureiyā
how to create custom login authentication? samplecode send me
These single steps will help you a lot:
Step 1️⃣: Open a browser
Step 2️⃣: Write down https://google.com or https://duck.com and press Enter
Step 3️⃣: In the search box, write down the same words you asked here
Step 4️⃣: Read the first results
Jamie
100000 data is in my database at the time rendering temple its taking so much of time
Jamie
What should I do
Nazim
Nazim
add custom media storage
Jamie
Okay
Charly
.
Abdulrasheed
Good day my co django-developers
I have a project going on for my client and he want a features where users will be able to upload a word documents file and he/she will be able to edit the documents in our app just like editing in msword and save it back to our database.
How can i acheive that?
I have try Many WYSIWYG but it is just only displaying the html format without the sytles included eg. Ckeditor,Tinymce.
Thanks in advance 
Patrick
.
Vas
Vas
Anonymous
Is it available to use multiple languages with multiple domains?
like this
en.superproject.localhost
de.superproject.localhost
fr.superproject.localhost
Rohan
How do I function a download button in django to send an image file from a url
Jayanthi
https://linkode.org/#orNSRD2LjoEhL5qzBIGo64
Jayanthi
// pagination problem i cant use queryset there is no forign key relation ship i am getting the data but only for first page and it takes more time
like 6 sec please modify the code
Farooq
Hi I am from Mumbai India
I need help in django
Actually I am working in hotel booking app where is all going good. But I want implement hotel location map for customer means when the customer book the hotel on booking page i want to hotel location map
Farooq
So how can I implement this
Vas
Farooq
Vasily
Doragonsureiyā
Джафар
Does anyone have any lectures on django? Where are all the moves listed and could be used as a pocket guide?
Rutya
How create django firebase notification API
Vasily
Why?
Seriously... Why? 🤔
Because I just started to LEARN. What should i do for using DTL instead of jinja2 for my case? https://docs.djangoproject.com/en/4.1/topics/templates/
Riad
Riad
Vasily
Anonymous
Hello
Anonymous
how to get the number of comments for each post
Anonymous
class Post(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE) content = models.TextField(blank=True)
time_create =models.DateTimeField(auto_now_add=True)
def __str__(self): return self.name
def get_absolute_url(self):
return reverse('pols:post', kwargs={'post_id': self.pk})
class Comment(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE)
post = models.ForeignKey(Post, on_delete=models.CASCADE) content = models.TextField(blank=True)
time_create = models.DateTimeField(auto_now_add=True)
Anonymous
def home(request): form = AddPostForm()
posts = Post.objects.all() id = Post.objects.get()
comments = Comment.objects.filter(post_id = id) summa = len(comments)
if request.method == 'POST': form = AddPostForm(request.POST, initial = {'user':request.user})
if form.is_valid(): post = form.save(commit=False)
post.user = request.user post.save()
try: return redirect('pols:home')
except: form.add_error(None, 'error')
context = {'form': form, 'posts': posts, 'summa': summa} return render(request, 'home.html', context)
Anonymous
but it throws an error
Rohan
How can I delete a table from models in django?
Riad
.
Hello how we can override local apps
Mirco
.
What ?
I have to modify saleor platform..
Saleor is django based framework.. So need to override default app
Mirco
Lena
Hi, why Django Rest Framework set_cookie not Working on browser?
Lena
It sends Cookie Definition in Response but does not save Cookie.
Mirco
Lena
Lena
Mirco
5173, React/Vite.
so different port = different origin for DJango = cookie not saved
Lena
Mirco
Lena
Lena
And Access/Refresh Token.