İremsultan
I did it yet it does not seem to get {% load static %} on the page in the first place. It shows as like i wrote it as a paragraph in html when i open the file so my css file also does not work. Can i send the file so you can check it out?
Erick
Hi guys, so I have a django implementation and I need to implement charts.js in this project, so my user is AbstractUser, where I made the differentiation through groups, now to implement the charts.js I need to get the users of their certain group and list them. Could someone point me to a documentation or something that can help me? I thank you for this. And sorry for my English, I'm using Google translator.
Erick
Help me please!
Erick
Thanks!
Erick
This will serve for the list and I can separate the members... in a kind of list?
Erick
Great, this way I believe I can put them in variables and list them. Thanks!
Ndubuisi
Sadly i cant understand why it does not work :( i did everything else
Structure: app_folder/static_folder/css_folder/style.css Html page: <link rel="stylesheet" href="{% static 'css_folder/style.css' %}">
Pooya
Hi I have style.css file in css folder in static. How do I have to reference images in css file?
Pooya
Hi I have style.css file in css folder in static. How do I have to reference images in css file?
I tried .edi { background-image: url("/static/img/sample.png") } But doesn't work
Radzivon
Hi! I need help with the implementation in DRF: • Import photos from external API at https://jsonplaceholder.typicode.com/photos; via both REST API and a CLI script • Import photos from JSON file (expecting the same data format as the external API's); via both REST API and a CLI script
Doragonsureiyā
Hi! I need help with the implementation in DRF: • Import photos from external API at https://jsonplaceholder.typicode.com/photos; via both REST API and a CLI script • Import photos from JSON file (expecting the same data format as the external API's); via both REST API and a CLI script
We're not here to do your job for you. This group is to help you on specific issues you have in YOUR code, so you have to show the code you wrote by yourself and explain where and why you are stuck... as simple as that. 🤷🏻‍♂️
Ogundare
Hello Devs, which free hosting site can I host my multiple apps? Pythonanywhere allows only one app. And heroku is going.
Doragonsureiyā
Hello Devs, which free hosting site can I host my multiple apps? Pythonanywhere allows only one app. And heroku is going.
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Alejandro Alomia
Can someone help me with rest_framework?
Alejandro Alomia
How do I add "acount" "next" "previous" "results" fields to my API?
Alejandro Alomia
How can I make a field in my API store a list of items?
Rojitech
Many to many field
ON
i got this problem: 2022/10/29 03:45:41 [crit] 975642#975642: *126 SSL_do_handshake() failed (SSL: e rror:0A00006C:SSL routines::bad key share) while SSL handshaking, client: 134.12 2.37.30, server: 0.0.0.0:443
Warrior
How to download only with response without using downlaod button
Warrior
Is that possible
Jahongir
Hello to eveyone. Who knows the solution to this error Got AttributeError when attempting to get a value for field `phone` on serializer `LoginSerializer`. The serializer field might be named incorrectly and not match any attribute or key on the `Response` instance. Original exception text was: 'Response' object has no attribute 'phone'.
Jahongir
my code: https://linkode.org/#rwRGulst1sm7AAspFrLuI2
Y
Hi, can I raise a question about Django?
Charly
Hi, can I raise a question about Django?
In a Django group? What do you think?
Y
How do I use permission group in Django project.
Y
I'd appreciate it if you could tell me the main concept I need to know in Django.
Y
I worked at a real project for Django, but I haven't felt it useful yet.
Rajat
Hi any one have experience to deploy django celery beat project on railways
iplogger
hey guys! can someone explain me one thing? in which situation in Django developer using JSON data to send smth to user?
iplogger
so why json? why not httpresponse or whole html
iplogger
oh thanks!
Neo
i can build one API that responds in JSON and then i can build the frontend for many different platforms, the JSON has the data and i can work with it however i want and display it however i want
Neo
on ios, android and even on the website i can develop a frontend in js/html and display the data from the json to the user as html
Ali Hasan
Hi everyone, if you want to do something on your data periodically (for example delete every item that has been expired from DB) , what are the options to achieve such thing ? I know about cron jobs but I want to know what other options are to search and learn the ideas. Thanks in advance
Neo
this gives you muuuuuuch more flexibility than html
Neo
cron would make the most sense though.
Neo
you can have job schedulers that do this but then you need something to trigger a job so where's the trigger?
Neo
so cron would be the right choice for something like this
Ali Hasan
so cron would be the right choice for something like this
Is there a database level thing ? I mean that the database will do this job periodically ?
Neo
Anonymous
Hey everyone I'm new to web programming using Django and I'm just asking if it's better to use only Django and html, css and others to build a website or use Django and react?
Anonymous
Which will be better cause I'm trying to build something like an e-commerce website that sells books as learning project
Anonymous
Tbh I'm still learning learning but I think it's monolith Django and react on the same server. So I'm just asking if it's ok to build a fully functional website with Django only or if it'd be better to use react on the front end rather than html and css
T-Br
Hello everyone. I am beginner in Django and I need your help . Please could you share me useful materials. I am wasting my time watching videos. But still I am confused. Thanks
Azin
Hey guys Could you please help me? I dont why when i want to login it returns none instead of user
Anonymous
Oh ok thanks a lot
Anonymous
+
T-Br
Thanks Dear I am so grateful. I will be back being someone who can develop a web application.
Ali Hasan
Pooya
Hello guys Please help me with this problem. I tried .edi { background-image: url("/static/img/sample.png") } But doesn't work in style.css file in css folder in static folder. Images are not loading. What can I do?
Pooya
Sure. Settings.py: STATIC_URL = '/static/' STATIC_ROOT = on.path.join(BASE_DIR, 'staticfiles') STTICFILES_DIRS = (os.path.join(BASE_DIR, 'static' ,) urls.py: if settings.DEBUG: urlpatterns +=static(settings.STATIC_URL ,document _root = settings.STATIC_ROOT)
drStrange
How to remove the square bracket django rest framework use in containing json values?
True
How to remove the square bracket django rest framework use in containing json values?
Brackets indicate list/array you don't have to remove it
drStrange
Brackets indicate list/array you don't have to remove it
I wanted my url endpoint to just show json values without the closing brackets.
Abhie
Hi guys I have two user models, such that only after logging into 1st you can sign up to the second one, however while rendering the I'd for the 2nd model it always get the 1st, may be becouse of the 1st one is alyaws logged in,
Wubalubadubdub
Hello, am trying to make a server for my vending machine project..I ask for a better to do this with django..I thought of approaching it with API but I don't know better..
drStrange
https://dpaste.org/iHQUe the link above is contain my views.py, models.py and serializers.py files. I intended to return my json value without it being return as a list. The error i got was UserInfo model is not JSON serializable
Abhie
maybe u set same rendreing in views
I did try instead of redirecting a changed to render and pass the context , user id as I required but it didn't wrk
Anonymous
In django rest Can we call another api inside other api of same project? Is it good practice?
Mihail
How to get name of django model field (not it's value) by Model class? Like that Model.field_name.__str__ # -> 'field_name'
Ravi
Hi guys I need help to make hardware asset management system with django
0x01
How can I redirect to another website after a form submit ?
Marc
How can I redirect to another website after a form submit ?
https://docs.djangoproject.com/en/4.1/topics/http/shortcuts/#redirect
Ray_Beast
Hello any one can help that if we want to centralize logging system
Ray_Beast
For example if our log we are running our code on 230 server and log are generating there so if we want to generate log file on 238 server from 230 how to achieve as 238 also contains password. Basically I want to redirect my log file path from 230 to 238.
Ray_Beast
Any idea or any suggestions on it
~
Hi all, I’m try to authentication my Django and React by azure ldap, My Django is working and make the authentication via azure ldap but I’m not success to do it via front request. Im getting the following error: “ The request body must contain the following parameter: 'client_id'. “ Any idea what can i do? The tutorial that Im using: https://django-auth-adfs.readthedocs.io/en/latest/azure_ad_config_guide.html#step-3-register-and-configure-an-azure-ad-frontend-application
Richa
Hello, is there anyone familiar with tastypie lib?