Д
Not an expert
do you know how an if-statement works
Nani
yes
Д
yes
have you tried adding some 'print' statements into your code?
Nani
no
Д
no
so you have not tried to solve this problem?
Nani
Tried man implementing directly into the HTML but its showing an error that's y i came here to get a help with you
Д
Tried man implementing directly into the HTML but its showing an error that's y i came here to get a help with you
the programmers best friend when figuring where the code goes wrong are print statements (take that with a grain of salt)
Д
so please, for the love of all that's good and Holy - do something of the like
Maxim
what are you even discussing? the first if in lines 2-3 obviously does something wrong
Д
what are you even discussing? the first if in lines 2-3 obviously does something wrong
100% but I'm trying to tell them how to find the problem
mike
Hello friends, is there any way to call field validation inside validate function in django serializer
Maxim
100% but I'm trying to tell them how to find the problem
I'm not disputing your approach, but it seems to me that you started from too far away
Maxim
they were DM'ing me earlier
ok btw, remind them that it is a violation of the rules (not punishable, if it doesn't bother you)
Д
I'd rather it didn't given that it feel somewhat entitled
Maxim
I'd rather it didn't given that it feel somewhat entitled
you always have a choice as long as you don't complain (this group is no place to complain), it's none of our business
Д
you always have a choice as long as you don't complain (this group is no place to complain), it's none of our business
it's easier to help people in the public since they have to keep their shit in line.
Maxim
i only informed you gave you a hint of your capabilities
rtg
In which ubuntu directory should we host multiple Django projects? /home, /var, ...?
rtg
I'll ask another way: Where did the creator of Ubuntu want us to host multiple Django projects? And because?
Maxim
I'll ask another way: Where did the creator of Ubuntu want us to host multiple Django projects? And because?
the creators of Ubuntu did not have time to come up with answers to all the questions anyone would ever ask
Д
I'll ask another way: Where did the creator of Ubuntu want us to host multiple Django projects? And because?
there's no answer to this that's "correct" - /var/www/ has been the default for many servers for many decades but I don't see why that should be the case. I'd think the best way to approach this is through how would you like to keep the permissions\file access separated. maybe you're doing something with Docker where you want external mount points - or you have multiple django apps, and you want them to have separate home directories or groups or whatever. the solutions really do seem to come down to what's "convenient" over what's absolutely correct, since most setups can be molded and re-configured into most others.
Maxim
if these were my projects and the server administered by me, everything would be inside /var/www, but this is my private opinion
cj
if these were my projects and the server administered by me, everything would be inside /var/www, but this is my private opinion
in the same case, my server, administered by me, my projects... I put everything inside /home/myuser/ for work servers, we use docker for the application being deployed
cj
I'll ask another way: Where did the creator of Ubuntu want us to host multiple Django projects? And because?
that's nonsense question, but as I read your messages in all the groups I could, you get always the same answer: "it doesn't matter" use the folder you want, just make sure you're configuring the webserver to use the folder you chose for that
Neo
I use /home
Neo
Makes it easy to configure other things but ofc this is on testing servers and personal servers
Д
there are some technical reasons where it might be preferable to have it one place over another for mount point reasons, I imagine
Д
but most of those get solved by having enough modularity and they really have to do with the holistic design of the system if you have to umount/mount some specific folders to get Django apps running
Mohammad
I need to for str representation in Django Admin. I have too apps with models BillingProfile and Address. Billing Profile str rep is by email field. But when associated with Address through foreign key and running below , the address in admin shows blank. Below are few snippets
Mohammad
Snippet 1 : is Address Model , Snippet 2 is BillingProfile model
Mohammad
https://pastebin.com/dKnkJFKm
Mohammad
Sorry found it, It was doing good, i did not had email for user that is why it was coming blank
Mohammad
Thank you
Alok
raise SQLDecodeError(f'Unknown token: {tok}') djongo.exceptions.SQLDecodeError: Keyword: Unknown token: TYPE Sub SQL: None FAILED SQL: ('ALTER TABLE "token_blacklist_blacklistedtoken" ALTER COLUMN "id"g',) Params: ([],) Version: 1.3.6 The above exception was the direct cause of the following exception: ————————————————————————————————— How to solve this error???
Alok
I am using Djongo engine to connect with mongoDB database.
Alok
anyone??
Doragonsureiyā
I am using Djongo engine to connect with mongoDB database.
Do you want to use Django with MongoDB? Then you shouldn't Please read this article: https://daniel.feldroy.com/when-to-use-mongodb-with-django.html
Shrikrushna
hello
Shrikrushna
Can someone solve this problem for me?
bikrant
Hello everyone Can you suggest which method is more efficient Filtering a list of data in the db or get the list and then filter it on server ?
bikrant
the first one
Thank you.its valid for nosql also?
Shrikrushna
No
damy
Maxim
damy
this answer is only valid until you state the essence of your difficulties
Maxim
Thank you.its valid for nosql also?
i don't know, but your question was bordering on the offopic before, and now it's completely
Mohit
Any front end web developer here
R@kesh
def insert_view(request,id): players = Players.objects.get(id=id) form = Players(instance=players) if request.method == 'POST': form = Players(request.POST, instance=players) if form.is_valid(): form.save() return redirect('/')
R@kesh
TypeError at /insert/26 Players() got an unexpected keyword argument 'instance' Request Method: GET Request URL: http://127.0.0.1:8000/insert/26 Django Version: 4.0.3 Exception Type: TypeError Exception Value: Players() got an unexpected keyword argument 'instance'
R@kesh
Help me what is this error
Sergey
Player has no argument instance. Show me Player class code.
Doragonsureiyā
Any front end web developer here
This is neither a job board nor a bulletin board.
Sergey
method init
heart_robber_hari
Any one know about edx
heart_robber_hari
Ora
Doragonsureiyā
Any one know about edx
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Taram
Hello guys. Where to store business logic? Some people say "fat models thin views", but in the end I get very fat models and it becomes architectural suicide.
iNeedHighMove
Hello guys I want to create a website like Twitch Now I need help for Plant-SubLive model It has 3 fields: 1 Foreignkey to user 2 Datetime field when sub started 3 Wich plant? 1Month, 2m, 3m .... Now I need to expire the sub when plant finishes What should I do? How check and do it? TNX
Geralt of Rivia
Channels_redis installation faild in my system.. anybody can help?
M
Please how can i use django and mongoDb
Mirco
Please how can i use django and mongoDb
Yes but not suggested Use Postgres for Django superpowers
Mykola 🐲🐉🃏
why when I add def get_context_data(self, **kwargs) into view class CreatePost(CreateView) what contain post method with forms, on template only info from get_context_data displayed, and forms not displayed??? but after commenting get_context_data all forms again displayed
Doragonsureiyā
Please how can i use django and mongoDb
Do you want to use Django with MongoDB? Then you shouldn't Please read this article: https://daniel.feldroy.com/when-to-use-mongodb-with-django.html
Kunal..
Does anyone have a good resource on chat integration in django rest api
Shabbir
Hello! I want to get sum of a column in other table by default. this is my code: https://dpaste.org/oTtWc please help me achieve this
RK
How to do Employee Mangaement attendance in Django
RK
Plz help
RK
Me
RK
Provide suggest
Maxim
How to do Employee Mangaement attendance in Django
1. create new project 2. write code 3. PROFIT
Alexander
Hello. To those who use DRF: what’s your strategy of dealing with situations when you have to overload something like get_queryset in the cases... where you don't have ORM at all? Emulating querysets somehow (but how)? Sticking to inheriting from like viewsets.ViewSet instead of viewsets.GenericViewSet and abandoning anything involving get_queryset?
RK
How will I capture login time and logout time in Django..I'm not getting correct information on Google..i.e is why I'm posting here..plz help me