Anonymous
Luis
Luis
Does "looping concepts" include how to iterate over a list or something like these?
Anonymous
Luis
Ooooh I think it is not necessary using django... it's a web framework. Any way, you can return a webpage with that "ASCII" shapes
Anonymous
Anonymous
Luis
I'm from Uruguay
Luis
But I am from India
I think here we have more people from India. Maybe they can provide a "django India channel" link or something similar. I want to help people, but my English skills are not good.
Anonymous
Anonymous
Luis
Do u use WhatsApp
Yes, I do. I think the conversation is getting a little offtopic. Please, send this kind of messages via peronal message.
professor
how can I improve my code using built in system https://dpaste.de/3t1Q as this way to response json behind login https://github.com/gauravkulkarni96/django-ajax-auth/blob/master/templates/home.html#L122 ?
professor
why am I always getting no such table: account_user https://dpaste.de/Vx5X??
Muflone
Arnav
Please help me guys,
I want to update details over weppage using Django admin section .
Example- want to change trip date through Django admin , give me solution for this problem
cj
Raph
What are the chances for bootstrap load the fonts but not the layout? 🤔
Arnav
Arnav
In html
Want to display my Name field
Arnav
Tell me the solution..
I m not here to listen your advice and suggestions.
Raph
cj
Raph
@c0x6A
Raph
could you help me here please?
Raph
idk why but boostrap isnt loading the menu style but is loading everything else O.o
Raph
why cant I {% load %} and {% extends %} together?
Raph
1 <!DOCTYPE html>
2 {% load basicapp_extra %}
3
4 {% extends "basicapp/base.html" %}
5 {% block body_block %}
6 <br><br><br>
7 <div class="container">
8 <h1>Welcome to INDEX</h1>
9 {{ text|cut:'Hello' }}
10 {{ number }}
11 </div>
12
13 {% endblock %}
Raph
Raph
then when I remove the line 4 the page loads but without the load and the extends (obsviouly)
Miguel
Hey guys, can u help me with a little error with django and docker? I can't access to http://localhost:8000 when docker-compose up is on
Yegor
Evening, why when I call related serializer, it doesn't woks? I get just "type" and "id" in comment_set field instead of what's in fields attribute.
https://dpaste.de/Yz4B
Luis
Luis
https://www.django-rest-framework.org/api-guide/serializers/#specifying-nested-serialization
Yegor
Yegor
Yegor
I got comments, but they ar not serialized
Yegor
nothing
Luis
Hmm... if they are related, article serializer should contain related comments. I can't figure out what's wrong there
Luis
nothing
Just for debug propose try to add depth attr in all your serializers
Yegor
Yegor
Im using this versions if anything
Django==2.2.7
djangorestframework==3.10.3
Luis
Nothing again(
What if you rename temporarily comment_set to comments ?
Yegor
Yegor
for FK
Luis
I have the crazy idea that it's returning the set of comments and not the serialized comments
Yegor
Yegor
i got "type": "user" and his id
Yegor
"relationships": {
"user": {
"data": {
"type": "User",
"id": "1"
}
},
# etc...
}
Yegor
despite the fact that i have user = UserSerializer()
Luis
Ok I don't know what's wrong here... Sorry @total_ordering I'm out of keyboard and traveling in a bus at route with bad internet connection! Can someone else give a hand here?
professor
do we always have to call get or post in class based views ?
from django.views import View
class ContactView(View):
def get(self, request):
# Code block for GET request
def post(self, request):
# Code block for POST request
def loginUser(request):
logic
Mirco
professor
professor
how do we make a request without post or get method in class method?
Mirco
for example?
If you don't need to change the get method, just don't override it
professor
the function based django overwrite get or post right?
professor
the case of function based , how it works without get or post methods?
professor
the version of function based is if request.method == 'POST':
Mirco
professor
is okay overwrite get or post methods ?
Mirco
Mirco
Even if you wanna show just an Hello world, u need to override the get method for example
professor
So, will I Have always have a post, get or head methods for my logic right while the function-based it doesn't care too much because it uses to get or post automatically?
Mirco
professor
I have seen random codes on the internet using if request.method == 'POST': or the CBV and some FBV it doesn't specify the request
Mirco
professor
to finish and is good practice to tell django the method request on CBVs or FBVs right?