Urvil
Hey, im working on django Ecommerce website and i have downloaded a template but when I implemted that template with django code, design gets messy For example I have made login/sign up page using django authenticate and when I add header footer from base.html both header footer design get messy (not properly placed and etc) Help please
Urvil
Are your static files setup properly?
Yes, I think I'm although some images are not showing from template and some are showing
Kandula
Hey Good resource to learn Django?
Doragonsureiyā
Hey Good resource to learn Django?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Tommaso
Hello, I would like to create a django website where a registered user can click on a map to create pointers which draw lines and poligons. Can anybody please point me some useful tutorial about that?
Tommaso
No, thats frontend stuff
Right. I asked here because i have seen some using javascript full stack, while i wanted to use something like geodjango in backend. Thanks anyway
Charly
Right. I asked here because i have seen some using javascript full stack, while i wanted to use something like geodjango in backend. Thanks anyway
Once you have the UI for it we can help you with the backend part. I don't think you should use geodjango just to store some points.
Rajan
I am using razorpay routes service
Rajan
And it doesn't have documentation for python for adding products
Rajan
I have getting a object from it so how can I get the values of that object
Doragonsureiyā
I am using razorpay routes service
This is not a Django specific question, please delete your offtopic message. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
razor X
{% for key, value in dict.items() %} {{key}}:{{value}} {% endfor %} This is not working, what am I doing wrong, is there any other way I also tried by iterating the key and accessing the value by dict['key']
razor X
Error couldn't parse '()'
Charly
Error couldn't parse '()'
remove parenthesis but I don't know why you iterate over items when youc an iterate the dict directly
razor X
It worked thanks
Mmms
hi everyone I am fresher django developer. i have issue on project setup time
Mmms
please anyone help me.
Doragonsureiyā
please anyone help me.
No one can help you until you explain your difficulties.
Mmms
I am working to setup project, I have problem in setting.py
Mmms
File "C:\python\Wagon\Wagon_spin-main\Wagon_spin-main\django\lib\site-packages\django\conf\init.py", line 89, in _setup self._wrapped = Settings(settings_module) File "C:\python\Wagon\Wagon_spin-main\Wagon_spin-main\django\lib\site-packages\django\conf\init.py", line 217, in init mod = importlib.import_module(self.SETTINGS_MODULE) File "C:\Program Files\Python38\lib\importlib\init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "C:\python\Wagon\Wagon_spin-main\Wagon_spin-main\django\Scripts\wagonspin\backend\main\settings.py", line 52, in <module> def traces_sampler(_: dict[str, Any]): # noqa TypeError: 'type' object is not subscriptable error
Mmms
please help me
The Inspired
please help me
you sure you have activated your virtual environment?
Mmms
(django) C:\python\Wagon\Wagon_spin-main\Wagon_spin-main\django\Scripts\wagonspin\backend>
Mmms
I solved that problem I have another problem with this error File "C:\python\Wagon\Wagon_spin-main\Wagon_spin-main\django\lib\site-packages\sentry_sdk\client.py", line 239, in init super(_Client, self).init(options=get_options(*args, **kwargs)) File "C:\python\Wagon\Wagon_spin-main\Wagon_spin-main\django\lib\site-packages\sentry_sdk\client.py", line 88, in _get_options raise TypeError("Unknown option %r" % (key,)) TypeError: Unknown option 'request_bodies'
Mmms
request_bodies=os.getenv("SENTRY_REQUEST_BODIES", "always"), problem here
Vishnu
I have a small general question. When you makemigations at the local machine after changes to model. Are you uplaoding the migation files to the server (Cpanel Hosting) ?? or only the model.py ?? i never uplaod the migrations files. I always upload the model.py and running migations at the terminal in cpanel. Is it the correct way ?? Even if you upload the migation files, you have to run the migartion in the termial at the server. Just I am confused if i am doing it correctly ??? i am not a team or a company. I always code alone from starts so i have no interations with the other persons.
You can upload the makemigrations to server and run migrate only in server. Practice am following is below: 1. Pull the changes 2. Pip install -r requirements.txt 3. py manage.py migrate 4. py manage.py runserver Note: Before pushing to server, make sure the requirements.txt is updated using pip freeze > requirements.txt and makemigrations done in this case. Please advise if any mistake on this, thank you!
Haleem
I am its a best system process?
Haleem
Also do u upload init and apps files in every app always ? Pls
Vishnu
Can someone explain the difference between a controller and a view in django? Am confused about the controller
Abhishek
what is the best free platform to deploy my django application?
ساره
I'm having a difficulty on figuring out how to visualize data in a dashboard from a sqlite3 db in a Django project with multiple apps someone please help me thank you all.
Kamronbek
Hello. when I want to confirm the code that came to the email, it says unAuthorized when the user makes a request. request is being sent from react to axois. the access token in the cookie is added to the request header. The drf docs state that the user can be retrieved via request.user or request.auth if the request header contains an access token. const axiosInstance = axios.create({ baseURL: 'http://localhost:8000/api/v1/', waiting time: 5000, headers: { "Authorization": Cookies.get('access_token') ? "JWT " + Cookies.get('access_token') : null, "Content-Type": "application/json", Get: 'application/json', }, }); export default axiosInstance;
The Inspired
what's the error code you are getting?
fairly sure this is a CORS error... need more info
ساره
I'm having a difficulty on figuring out how to visualize data in a dashboard from a sqlite3 db in a Django project with multiple apps someone please help me thank you all.
I tried to visualize it using chart.js but it just displays an empty space in the website I couldn't find a way to display the charts and data
realme
Can anyone suggest how to host my django on my own pc/laptop
ford
If it were you would start by I was doing so and so in Django and I'm getting this error, here is the code in Pastebin, how can I fix it?
Nega
Hi, I have a problem. How do I need to save the file with custom name at custom path? With this default_storage.save(os.path.join(MEMES_DIR, meme_name), meme_file) I have error about Suspicious File operation - path traversal attempt
Benso
Hello guys anyone with a book for studying Django Rest Framework.
Ibnu
Hello,any book on Django + htmx 😁
Mirco
Hello guys anyone with a book for studying Django Rest Framework.
Django for APIs Buy it, we don't support piracy here
Mirco
Hello,any book on Django + htmx 😁
Nope, you can find resources online but not books
$root:~/coder
Hellow here ! I deployed my django app on heroku but once i create post with image to a certain time image from the post are not shown
Dnyaneshwar
it is possible to show data(only specific fields) of one table into another table without defining fields in table one
Dnyaneshwar
for admin panel
Qwerty
it is possible to show data(only specific fields) of one table into another table without defining fields in table one
If there is a foreign key connection between the tables, you can use the inline parameter
Dnyaneshwar
Inline is not working for that
Qwerty
Dnyaneshwar
actually tables not having relationship between them
-.................................-
hello, I have some difficulty in creating a profile for users, and in the authentication system can you help me?
🏅♐Mark
after i integrated razorpay with django after clicking the payment button its showing only a white page
Urvil
Firstly check to make sure that they are setup properly
I did this, still having same issue Also now when I log in my system cart icon from header loose it's position
🗽
Hey guys, I deployed my small app on pythonanywhere and it had something integrated with celery, when i try to run celery, it has connection problem with rabbitmq, is there anyone who has ever faced that issue, how can configure connection with django and cloudamqp ?
🏅♐Mark
🏅♐Mark
Probably a mistake on your code
But I cannot send pictures here
Khouloud
How I can connect flutter and django
Charly
But I cannot send pictures here
Why would you use an image for sending text? Read rule 5 to know how to share code.
Charly
How I can connect flutter and django
You don't, you build an API and consume it from flutter
Maria
Hi all , I have a doubt. I have a django model and it has a column of type CharField, null=true and blank=true. When I don't enter value for that column it is interpreting it as blank. How to make it interpret as NULL.. ? Pls help.
Ammar
Hi all , I have a doubt. I have a django model and it has a column of type CharField, null=true and blank=true. When I don't enter value for that column it is interpreting it as blank. How to make it interpret as NULL.. ? Pls help.
one of the way is to check if the value is empty and if so change it's value to null and to override the save ( create ) depending where you are doing the creating ( serializer, form, view ) as it's not stated value= validated_data.pop("field") if value.isspace(): value= null module.Objects.create(field=value,**validated_data)