Mahdi
Navin
Hi everyone.. Hope you all good. I'm Naveen and I'm new for django. I got some issue while trying to connect django with oracle database
The problem is
In settings.py I have changed the configurations to oracle
But I use Service name instead of SID
After this when I run the server
The admin page is not working and shows server error 500
Please help friends
Mirco
Navin
Yes.. My company using oracle sql developer as a database for the training.
Mirco
Navin
The error in the terminal like
"GET /admin/ HTTP/1.1" 500 145
And in the browser it shows
Server Error (500)
Navin
It occurs when I try to login the admin page
Navin
When I use default SQLite as the database in settings. All works fine.
When I change the database to oracle. This problem is occuring
Fan / Ac
is there something better than django shell,
like i can set without using env vars and stuff
Mirco
Chaitanya
CryptoHunt
Hello everyone
How can import MEDIA_ROOT var from settings to view?
CryptoHunt
Got it: from django.conf import settings and then settings.MEDIA_ROOT
Amir
Sharon
Hi,
I was using Php laravel recently started using django for web app development.
The problem I’m facing is with models and relationships I’m not able to do the joins and relationships like I used to do in laravel I wanted to do complex sql queries. Any suggestions or references
Tanner
Tanner
@teligus_in when it doesn’t, you can drop down to SQL at any time using .raw()
mike
I have 5 fields in serailizer and want to make 3 field together not null during update . What to do?
Вячеслав
Вячеслав
ohh, my bad. It will be more accurate to implement method "validate"
Вячеслав
def validate(self, attrs):
if not (
attrs.get("waste_source_address")
or attrs.get("waste_source_coordinates")
or attrs.get("waste_source_fias")
):
msg = "something wrong message"
raise ValidationError(
{
"waste_source_address": msg,
"waste_source_latitude": msg,
"waste_source_longitude": msg,
"waste_source_fias": msg,
}
)
return attrs
R
I have created a form in my template and and added a text field and an input file field and gave it name caption for text and image for input file field...the form action is {% url 'homepage' %} so on clicking submit it should go to url homepage and from that url it will go to views.home and there in function
If request.method == 'POST'
caption =request.POST.get('caption')
image = request.FILES.get('image')
user = request.user
print (caption,image,user)
And after data is passed in my form image and caption and clicking on Submit it should print caption and image on my terminal if I am not wrong? But it's not printing...also I have given method= post in my form and csrf token but still the data is displaying in my adress bar and terminal the csrf key and followed by data I posted
Please solve my issue if anyone know what exactly happening
Doragonsureiyā
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like:
- https://dpaste.org
- https://linkode.org
- https://hastebin.com
- https://bin.kv2.dev
If you posted a wall of text, go back and delete it.
R
Anonymous
Anonymous
R
hey guys i have created an app that will post some images and caption to it....i can add images and caption from admin but only caption not images from template...can anyone give a solution? error is image attribute has no file attached to it
Prabhakaran
Try to define imagefield and charfield seperately and have it under a model..
Anshu
R
Azizbek Xushnazarov
I have a serializer that has required=True flags.
For partitial updates I need to use patch method but in swagger-ui it is requiring all fields to be filled.
What can I do about it?
Swapnil
How to update multiple tables values (foreign key and it is a dependent tables) using serializer?
In advance thank you
Minh
any one have an idea or keyword for monthly subscription in django?
Nareth
How to manage oauth with django application?
Mirco
Mirco
just type django oauth on Google
Nareth
@pyflare Thank. i'm using Django OAuth Toolkit
Nareth
have some problem with code becuz i'm not expert python programing language
Mirco
So go back study Python before using Django
ms tk
How can i use jwt token in django project created from other django project
213
So go back study Python before using Django
And you go back study humanity before talking.
If you find the knowledge level here is low for you, look for a job at google or Facebook where you can show the world your intelligence and knowledge
Alireza
It there anyone here who can help me as a teammate to develop a django project?
Ghorz
Bright
Bright
Aayush
Bright
In python, you can chose to stand as a software developer or you focus on web, if you want to focus on web, you need to learn python at least little and you can move in to its framework
Bright
But in everything, the more you build projects either as a software developer or web the more you know, no one in this field knows it all, please let use love our selves, if will do, we can learn from each other
Humoyun Хумоюн
Hello everybody. Could anybody have a look at this question please ?
It is general, not specific about code.
https://stackoverflow.com/q/70348357/8141305
Vinay
How to return another .py file in views.py function
Vinay
Like when I call a function in views.py I want to run another function from another data.py file
Vinay
Please help
Manoj
Please help in django getting error of
Cannot import name 'url' from django.conf.urls
Manoj
Not getting url
Piyush
Piyush
Piyush
Azizbek Xushnazarov
Why there is no BigIntegerField in serialiers?
Sparrow
Mohamad Reza
Smiley
Can anyone explain me about AbstractUser
cj
Smiley
I want to create users from frontend
Bright
Hey does anyone work with scrapy?
ikromjonovs
how to solve uwsgi.service emporer error
ikromjonovs
Charly
Smiley
ikromjonovs
Warning: The unit file, source configuration file or drop-ins of uwsgi.service changed on disk. Run 'systemctl daemon-reload' to reload units.
● uwsgi.service - uWSGI Emperor
Loaded: loaded (/etc/systemd/system/uwsgi.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-12-14 23:29:11 +05; 38min ago
Main PID: 17054 (code=exited, status=203/EXEC)
Charly