Djifferson
Treehouse
Djifferson
And so on .....
乌卡帕拉
hi guys, how to pass the model parameters or variables to templatetag, such as
{% cal_vc fruit.vc %}, but {% cal_vc 0.36 %} is worked though.
Elflord
Hello guys new to django framework
Rohan
Ghorz
hello guys, how do I pass results to context_data from the snippet below
https://dpaste.de/N027
Anonymous
I’m trying to write an app Server that receives and send data for 20 clients via TCP and a client via UFP. Any friend who has do it or have any suggestions? Thank you so much.
Mirco
inchidi
Mirco
Ghorz
Mirco
Ghorz
Read here
Thanks, I understand this perfectly. The issue is am working with formview. How do I pass data to context right inside the form_valid function
Ghorz
Okay
Mirco
Ghorz
If you look the code clearly on line 10
Ghorz
How will results be passes to context data
Anonymous
guys can it possible django model status change just a button click
Mirco
Ghorz
It is not a model data. Instead data from a form was passed to a function. I want to return the results sets to a context data so I can display it in my template
Mirco
Ghorz
Yes
Ghorz
https://dpaste.de/N027
Ghorz
Ghorz
How I forgot OOP I don't know. Have not coded since January 5th, need to brush up
Mirco
Mirco
That's why it's important to know Python before Django
Ghorz
That's why it's important to know Python before Django
Yea I coded python for 4years before I tried django. I hated OOP as a C programmer until I started with python. Even while working with python, i used pure function. Django made me create a tiny space in my heart for oop
Mirco
Ghorz
since to work now but results resets to None in get_context_data
Anonymous
I need a help on django
i.e how to create rest API to call services from elastic search
Ghorz
it seem to be localized
Mirco
Ghorz
self cant be used outside a function. am thankful for your help, what I will do is globalise the results variable
Mirco
Nandu
Rohan
Rohan
C doesn't have classes at all
Rohan
Structs is the wey to go in C
Anonymous
Hi Guys! I want to know which is better to learn: django or nodejs? I am proficient at C language only. I don't knlow anything much about Python or JavaScript... Can you please help?
Sanjay Krishnan
Does django support composite primary key, like combination of 2 fields as primary key without having an extra column named id, i have googled a lot and couldn't find a proper solution to it..
Sanjay Krishnan
Has anyone faced this problem?
inchidi
Anonymous
@Inchidi so you mean to say that django is equal to learning python + javascript + nodejs
Anonymous
(concept wise)
sahil
Hey everyone
I want to learn Django as fast as possible could you provide any tutorial or video lectures
Anonymous
djangogirlstutorial is the best one as far as I know
inchidi
inchidi
sahil
Sorry but i only want link of video lectures
{°_°}
Anonymous
sahil
inchidi
Anonymous
In terms of ease of learning..
inchidi
how about just start learning? 🤔
Anonymous
Kaio
Guys.. I'm using django-filter, the problem is I have +400 entries in my database and I don't want to display all of that in my page without filtering... but when I user [:25] in my query.. the filtering gets error...
Anyone has a clue?
inchidi
Kaio
I tried.. but it seems not working.. the paginate_by only paginate the queryset of the listview.. but I'm displaying the results using the FilterQuerySet
Kaio
didn't find a way to paginate the filtering
inchidi
inchidi
pls share your view
Kaio
class CompanyListView(ListView):
model = Company
paginate_by = 9
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['filter'] = CompanyFilter(self.request.GET, queryset=self.get_queryset())
return context
Miguel
hey guys, good day
inchidi
Kaio
Good!
Kaio
I'm trying
`def get_queryset(self):
return CompanyFilter(self.request.GET, queryset=Company.objects.all()).qs`
inchidi
inchidi
should be something like this