sam
hello my friends, i'm writing rest api test case's for my project but it returns 401 even though i create_superuser and log in by self.client.login can anyone guide me what should i do? i checked a lot of docs but didn't found the solution.
sam
404 is not found. 401 is not authorised
Anonymous
404 is not found. 401 is not authorised
If it's not authorized try adding the header Authorization
Sir, Earl
ever come across: The following packages have unmet dependencies: postgresql-12 : Depends: postgresql-common (>= 182~) but it is not going to be installed Recommends: sysstat but it is not installable E: Unable to correct problems, you have held broken packages.
Dexter
Anyone has django by example of packt
Dev__master
Hi team, May I know group_by will works in django
Alex
Hi team, May I know group_by will works in django
https://stackoverflow.com/a/629691/2516502 https://docs.djangoproject.com/en/3.2/topics/db/aggregation/#values > In this example, the authors will be grouped by name, so you will only get an annotated result for each unique author name.
Dev__master
@alkalit sorry, not exactly like this, I will post code here please check once
Dev__master
[ "123":[{ "id": "123", "name": "test", "group": "test_group" }, { "id": "123", "name": "test", "group": "test2_group" }], "456":[{ "id": "456", "name": "test2", "group": "test_group2" }, { "id": "456", "name": "test2", "group": "test_group3" }]]
Dev__master
I want group the items into like this
Alex
I want group the items into like this
Python has its own group by https://docs.python.org/3/library/itertools.html#itertools.groupby
Dev__master
Ok, Thanks @alkalit
Kafolat Ta'lim
Hi geeks, I have a problem, my site on django is not loading bg pictures from style.css how can I fix this problem
Alex
Read official doc about static files
I think there need to be added "troubleshooting" section in django's static doc. One of the topmost question is "my static files do not show up, what to do?"
Islomiddin
Hi everyone👋🏻. i need help. i am learning django and i am working on posts but i can't work with pictures. Picture of my post isn't appearing. please help me
Islomiddin
How do you mean? It's not allowing you use the imagefield or it's not rendering on your template?
I have fix this bug just. Thanks for attention😊. "Documnt " was reason of bug. I should be document
madswall
Hi everyone! Does anybody used dynaconf for django? If so, what can you say about it?
madswall
During several years I've used django-environ, and it is quite good. Recently, I found that last commit was 2 years ago so I started to find some fresh and maintained one
Karan
How to learn django completely
madswall
How to learn django completely
I advise you to go through trydjango series, if you don't work with django before. Pretty clean. Then, try to create some project and deploy it to production (trydjango series will help you). You will face a lot of issues, but it will help you to learn faster. In parallel, you should deep dive into python world to raise your knowledge to more advanced level. And if you decide to become backend developer, definetely look at backend roadmap, to understand widely what you should know. You should be able to understand what is going on in django official documentation. Try to look at some best practice collection like Two Scoops of Django. Learn REST toolkits like DRF (Django REST framework). And keep practicing. More project you will build, more experience you will gain.
Ankit
Hello everyone. I want to know how can a logged in user can see his/her own profile only ? I have created a view using I'd where I have fetched the queryset using Id then I have used a template name = profile.html where I have included my data of particular object of model.
Ankit
I got an error reverse of profile becoz of I have used a url in home.html template for view profile <a href="{% urls 'profile' %} </a>, I also tried <a href="{% urls 'profile' pr.id%} </a> where pr has stored queryset
Anshu
And show the code
Ankit
I don't know about pastebin
Ankit
Please give me the link
Anshu
https://pastebin.com/
sheikh
how to load fixtures in django docker environment in production?
Jucaoma
Hello, I am trying to deploy with different environments (separating a settings file for each one), when I run the development one it seems that everything is ok, but some visual aspects do not work in the production one. Any idea what i may be doing wrong?
Nayan
Hi i need to upload multiple file ( zip, pdf,mp4,etc) with large file size how can i achive this i need to put all this data to seperate directory for each upload . file size will vary while doing multiple upload . please help how can i achive this
Aza
Hello guys,has this channel who worked with elastic search-dsl,exactly to make query with AND condition?
HamidReza Fekri
hello guys i need tutorial for shopping cart in session that save orderitem object in sseion if not logged in and when logged in save order in database and use ajax for it i google but i can't find anything
HamidReza Fekri
please help
Ahmed
you get file_id with this
Anonymous
Hello
Anonymous
Someone for help me with a problem in Django
Doragonsureiyā
Someone for help me with a problem in Django
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
Sergio
Hi people, how can I convert my project into a SaaS? I only know django_schemas. Any other suggestion?
Charly
Hi people, how can I convert my project into a SaaS? I only know django_schemas. Any other suggestion?
That's a broad question, it depends on how you programmed the app, the r is no magic that you can use to just convert it
Charly
Oh got it. But there are documentation about It?
No as I told you, it depends on how you buid it
Sergio
I've been looking the differents ways but only exists three alternatives.
Sergio
Sergio
I would like to know the differents ways that we have to implement it
Marshal
It's not trivial
Are you making it for ecommece?
Sergio
Are you making it for ecommece?
No, I need it for a monitoring app, it's related with IoT
Sergio
Marshal I can share you an interesting blog that I found. This https://sophilabs.com/blog/django-tenant-schemas-multi-tenant-application
Hernan
If you are with venv activate, then can try with "pip install django"
Suman
How to upload multiple files using django_restframework?
Doragonsureiyā
How to upload multiple files using django_restframework?
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box, write down the same words you asked here Step 4: Read the first results
sheikh
Manage.py load data?
Yes but in production docker environment it gives me error command not found fixture nsme?
Aza
Hello guys,has this channel who worked with elastic search-dsl,exactly to make query with AND condition?
Vinod
If anyone needs help on clearance of interview on python and django please reach me out on any help
Firdavs
I get django datas via ajax and I put them html but there is a function in jquery whem i click it but it dont work, pls help me
Muhammadamin
guys
Muhammadamin
Need Your help on Django-rest-framework
Muhammadamin
def result(request, pk): user = request.user quizes = get_object_or_404(TestBodyLevel, id=pk) scores = 0 if request.method == 'POST': questions = request.POST.getlist('question') answers = request.POST.getlist('answer') attempter = Attemper.objects.create(user=user, test_body_level=quizes, score=0) for q, a in zip(questions, answers): question = Question.objects.get(id=q) answer = Answer.objects.get(id=a) if answer.is_correct == True: scores += question.points attempter.score += scores attempter.save() return redirect('home')
kritikos
how to load fixtures in django docker environment in production?
Can you paste your command here ? Or some part of your docker or docker-compose file ?
Cynthia
Hey guys . I need help with an error in visual studio code. The error is i we cannot connect to the extension market at this time please try again later