Alex Random
....
Eric
(2), I 'am Building a web application that will provide online courses, with lectures and possibly quizzes and tests as part of the course
You might just have to write a lot of that functionality yourself, although there are courseware packages like this available: https://djangopackages.org/packages/p/courseflow/
Animesh
I am a beginner can anyone suggest me a good Django project to work upon??
Check this: https://data-flair.training/blogs/django-project-ideas/
Cosby
Hi please I need help in getting data from a form
Mirco
Hi please I need help in getting data from a form
if u don't explain yur context, it's very hard to help ya 😊
Jimmies San
Владислав
Hi please In need help django-organizations methods. This actual?
tfhx8
why do you want to break HTTP Status Codes?
It job, but label "200 OK" print on html page, but me nned print other label
tfhx8
why are you sending 200 on an Exception?
instead 403, me need print status 200 and other text
Mirco
if you don't share the code we cannot help ya
Jimmies San
if you don't share the code we cannot help ya
and even if you do maybe you will be trolled 😎😎😎
tfhx8
instead status_code = 503 i make 200 and on page print 200 OK, but need own text
tfhx8
https://www.django-rest-framework.org/api-guide/exceptions/#APIException
cj
instead 403, me need print status 200 and other text
but why? why do you want to break the internet?
tfhx8
Me need print special text users, when access denied. Example: "Your never API key"
tfhx8
I checked api kei in uri string
tfhx8
Checked api job in custom method permissions
tfhx8
Me nned simple change print text
tfhx8
Are you know how it make?
cj
and you want to return an error message with 200 status code? 🤔🤔🤔🤔
cj
Are you know how it make?
yes, but what you want to do is totally nonsense
cj
you can send a custom detail message with the right error status...
cj
... but wanting to send an OK status with error message (200) where there really have to be an error status (4xx or 5xx) with its error message, is totally insane
tfhx8
... but wanting to send an OK status with error message (200) where there really have to be an error status (4xx or 5xx) with its error message, is totally insane
I agree, but here i need check on true api key. Users enter api kei in uri(part url) and me need say, "Your never apikey"
cj
I agree, but here i need check on true api key. Users enter api kei in uri(part url) and me need say, "Your never apikey"
also that message doesn't make sense, "your never API key", what does that mean? the user didn't supply an API key, or used a wrong one? in that case you should use 403 status code, not 200
cj
how it make?)
just write the text you want as a parameter in the exception you want to raise 🤷🏻‍♂
cj
Are you can send example?
raise ParseError("Your English is bad") that would return a 400 with a detail "Your English is bad", for example 🤷🏻‍♂️
tfhx8
detail print on html page?
cj
detail print on html page?
you can read the detail from the endpoint with JS and render it wherever you want... if I'm not wrong, you're doing an API, right?
cj
and 200 status?
don't do that... why do you want to show an error message in a success status? WHY?
cj
yes
then do the things in the proper way, don't try to break the Internet
tfhx8
don't do that... why do you want to show an error message in a success status? WHY?
yes, i changed my mind about doing this, i will check inner process_request my DRF
tfhx8
how to check api key and other parameters using DRF?
tfhx8
Exists example?)
Jimmies San
cj
how to check api key and other parameters using DRF?
if you want to deal with authentication things using DRF, take a look to djoser, it's a nice package for that things
cj
you have a lot of patience man 😂😂😂
at least he didn't insult people, like other guys that I banned for that reason 🙂
Jimmies San
😂😂😂😂😂
Borys
Dear colleagues good morning. I am here to see if it is possible to help me by solving a problem in the deployment of my django project I am working with the heroku server and I have this problem at the moment of completing the deploy and today the necessary configuration.
Borys
Application error An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command heroku logs --tail
Borys
Is it ok if I send the project repository?
cj
Is it ok if I send the project repository?
yes, but showing the heroku logs would be helpful too
Borys
I can't send the capture, the group doesn't let me
Ashlah
@Theborycuas put it in hastebin.com or del.dog will help people to read the logs
Ashlah
😊😊
Ashlah
https://del.dog/grakelidet.txt
Anonymous
Hello guys Has anyone used django and vuejs?
Anonymous
I'm trying to create an evoting site with django Can anybody help me with the model design?
Borys
https://del.dog/ysenuhacup
Ashlah
could you please provide the Procfile of your project?
Batman
hello, I have a cookiecutter-django project When trying to use https in local, Django answers with a: You're accessing the development server over HTTPS, but it only supports HTTP I have already googled and tried changing values in these variables: https://hastebin.com/uyisinetun.shell
https://django-extensions.readthedocs.io/en/latest/runserver_plus.html RunServerPlus — django-extensions 2.2.5 documentation take a look at this... it will help you setup https on local server (not supposed to be used in production though)
tfhx8
Is it good to keep user balance in redis?
Muslim
tfhx8
and if temporarily?
Muslim
and if temporarily?
What balance is used for?
tfhx8
ok
tfhx8
What balance is used for?
Example use how money )
tfhx8
And use transtions in signals, normal?
Muslim
Example use how money )
Then still very bad, balance and all transactions should be persistent
Cesar
And use transtions in signals, normal?
Normally that's how I do it
Cesar
Balance = integerfield(...editable=False) And signal on transaction to adjust balance
tfhx8
Normally that's how I do it
If transaction in method save() inner model?
Cesar
better use float or double type
Yeah, just quick answer for example 😂