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
Luis
I'm from Uruguay
Anonymous
I'm from Uruguay
Not knowing much about Uruguay
Anonymous
I'm from Uruguay
But I am from India
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.
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 ?
Ghorz
Where can I store my Chrome driver exe file?
Anyway, just call it by the location or store in in your project then declare base dir and access it
professor
why am I always getting no such table: account_user https://dpaste.de/Vx5X??
Muflone
why am I always getting no such table: account_user https://dpaste.de/Vx5X??
An initial migration shouldn't have dependencies
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
Raph
What are the chances for bootstrap load the fonts but not the layout? 🤔
Arnav
what have you tried to do so far? at least have you tried to do something?
Class Detail(models.Model): Name=models.CharField(maz_length=100)
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
Tell me the solution.. I m not here to listen your advice and suggestions.
lol bro... be polite, nobody has to do anything for you
cj
Tell me the solution.. I m not here to listen your advice and suggestions.
🤷🏻‍♂️ then please close the door when you leave the group. Thank you
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
cj
idk why but boostrap isnt loading the menu style but is loading everything else O.o
well... that's not Django related, check your CSS/HTML, maybe something is not right
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
then when I remove the line 4 the page loads but without the load and the extends (obsviouly)
cj
why cant I {% load %} and {% extends %} together?
first you have to put {% extends ... %} then {% load ... %}
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
Yegor
You should set the depth attribute in meta class
to what meaning? I tried it to 1-6, but I got the same
Luis
https://www.django-rest-framework.org/api-guide/serializers/#specifying-nested-serialization
Yegor
https://www.django-rest-framework.org/api-guide/serializers/#specifying-nested-serialization
should I Init it in parent serializer too? It doesnt work 😩
Luis
should I Init it in parent serializer too? It doesnt work 😩
Why comment model does not have ForeignkeyField to article model?
Yegor
I got comments, but they ar not serialized
Luis
It has, I've created Mixin
Oooh sorry! I didn't see that
Luis
I got comments, but they ar not serialized
What happens if you add depth = 1 to article serializer?
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
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
for FK
Luis
I have the crazy idea that it's returning the set of comments and not the serialized comments
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
professor
Nope
for example?
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
Mirco
how do we make a request without post or get method in class method?
If you don't override those methods, Django will use the base ones
professor
the function based django overwrite get or post right?
Mirco
the function based django overwrite get or post right?
Your ContactView inherits from View Inside View class, there already are get and post methods Django will use if you don't override them
professor
the case of function based , how it works without get or post methods?
Mirco
the case of function based , how it works without get or post methods?
You can control them with request.method There are some internal Django stuff that also define default get/post logic when dispatch the request to your function based views
professor
the version of function based is if request.method == 'POST':
professor
is okay overwrite get or post methods ?
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
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?
Even into function based, if you need to have your logic , for example with a basic form , you need to check the request method
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
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
Instead of thinking about random codes , try to study on official docs what are the main difference between CBVs and FBVs It's easier
professor
to finish and is good practice to tell django the method request on CBVs or FBVs right?