cj
ah, I got it, you mean using the mobile view using the desktop browser
Anonymous
Yes haha..
Anonymous
guys country = models.ForeignKey(Country,on_delete=models.CASCADE)
Anonymous
ı wanna filter tihs and count()
Anonymous
how can ı do tihs ??
Gil
https://stackoverflow.com/questions/1981524/django-filtering-on-foreign-key-properties
https://docs.djangoproject.com/en/3.0/topics/db/queries/#retrieving-specific-objects-with-filters
https://docs.djangoproject.com/en/3.0/topics/db/aggregation/
Julio
Hi, I need help. I'm trying to create_or_update in Django models save function with another model when I save it. Anyone have a example or idea how I could do it?
Cesar
Shery
Anonymous
I want have a list of skills or items that can be update from my admin and be show in template I try using category and slug but not given me what I want need
Anonymous
Anonymous
This is what I want to archive in python code
Skills=['CsS','html','go',]
For skill in skills:
Print(skill)
Please have put this in my views.py and use the {%for skill in skill %} in my template but this logic is not working please help me out on how to structure it the code so that the view and template can understand
Gil
Are you passing skills in context?
Paste return function view
Gil
https://docs.djangoproject.com/en/3.0/intro/tutorial03/#write-views-that-actually-do-something
Cesar
Anonymous
Anonymous
Anonymous
Class project(model.models):
Skill =models.textfield(max_length=20)
Gaurav
Guys is there any group for react js??
raven
Anonymous
Please I need resource that explain more about performing login in views and is it composry to have a model for every logic just a little more explanation or resources that can help thanks
Anonymous
raven
from django.views.generic import ListView
from .models import Skills
class SkillsList(Listview):
model = Skills
context_object_name = 'skills'
template_name = 'skills/skills_list.html'
Anonymous
raven
something like this
Anonymous
raven
actually you have to elaborate a bit about your need because i answered of what i understood from your request
Cesar
Skills is taking a textfield
There it is, you are using a char field.... if you do a for look in a text, it will iterate over every CHAR in that field...
raven
Anonymous
Cesar
What should I do bro
Create a model (language) then relate it to your model via a ManyToMany field....
raven
raven
i think I'm nit getting his requirements
Cesar
he is trying to fo a for in a textfield
raven
yeah then it will be just objects = project.objects.all()
and use {{object.Skill}} in template
Cesar
Cesar
Cesar
(s)he might be confused with text VS. list...
raven
😁👍
SI
I have a problem on django rest API when i am trying to login error show
SI
from rest_framework import serializers
class User(serializers.HyperlinkedModekSsdializer):
class Meta:
model = User
fields = ("url", "username", "email")
Cesar
Anonymous
Hi developers, i have in elasticseach about 45k records. I have to get top 10 words used in datas ? Anyone any idea how to get it? Thanks
Doragonsureiyā
Anonymous
Please guys,how can I accept Bitcoin deposits in my django app
Anonymous
Why is it that I cant get data from two different model on a single context this as been challenging or is there any way to go about it
Gourav
Foreign key between two database tables
Cesar
Cesar
Please check this, i would like to use the limit_choices_to in ForeignKey, just im not really sure how it works when using a self.field related verification
https://del.dog/cumolepocu.txt
Omair
Dextroleav
Hey guys, if i use ngrok for hosting purpose then i need to change urls of my project right?
Astrapel
Gourav
Foreign key between two database tables
Dextroleav
Anonymous
Anonymous
hey guys,i was following a tutorials for django app https://blog.logrocket.com/creating-an-app-with-react-and-django/ n they didnt created it so i need to create it. so, can anyone tell functionality of serializer
Anonymous
means they havent shown serializer but r saying to use it
raven
serializers convert Python object to json or other format
__init__
I gues serializer used to serialize django model to Json format
__init__
Anonymous
ohkkk
raven
ohkkk
web browser can't understand python object therefore before sending as response it is converted to json. When you work without rest you send processed html template .
raven
when you do rest you talk in json or xml
Anonymous
so when we use rest we just pass data in json format and other things are managed in frontend only data is sent through backend while witout it we send whole html ..right??
raven
Julio
Hi people, I have a question. How I can pre populate data by a foreign key in Django admin?
Julio
Like if I choose one foreign key other labels can be set with data
Ram
User auth fails when i try to log in in my app
It stores the data in db when user registers
But when i use same credentials
It says pl enter correct username and password
Anonymous
hi
{% trans "smth" %} what is the usage for ?
Fabian
Finding
anyone making location based app. I have an OGR failure. how can I solve it?🙏🏾🙏🏾🙏🏾🙏🏾🙏🏾
Anonymous