Ghorz
Kartikeya
Ghorz
Deepak
How to use audiofield in django
Ban
Hello guys
I need to create a form that contains two models. I found the django-betterforms lib on the internet but it doesn't work for me in django 3.1
Ghorz
lady
Hi I am new to Django ,
However I want to implement this
A user can fill a form then on submission it will check if the user is logged in if not it will require login then redirect to them form but still remember what the user keyed in initially
Bagas
What is best practice override third party settings for test?
I use django-oauth-toolkit, and override like this
oauth2_settings.ACCESS_TOKEN_EXPIRE_SECONDS = 2
but will failed test when i run = python manage.py test
and strange, will pass when i run specific = python manage.py test myappoauth2.tests
When still use python 2.7 run python manage.py test, is pass.
Sorry with my english 😊
Mehmet
from django.test.utils import override_settings
you can use this function as decorator on test case function to override specific settings.
Mehmet
@override_settings(JWT_EXPIRE=timedelta(seconds=60))
def test_sth(self):
pass
AliReZa
Why do media files upload to /var/www/ when I use ngnix to deploy a project?
Bagas
use this will work
oauth2_settings.ACCESS_TOKEN_EXPIRE_SECONDS = 6
Bagas
but when test everything with python manage.py test will fail
Bagas
I use python 3.6
Bagas
django-oauth-toolkit==1.3.2
Bagas
before,
python 2.7
django-oauth-toolkit==0.10.0
Anonymous
Hi! A have a problem
When I try to "django-admin startproject mysite" in cmd (Windows 10), I get a "denied access
"
محمد دلشاد
محمد دلشاد
or django is avaiable there
Bagas
The "problem" in django-oauth-toolkit.
They cache the value :(
token.get(
"expires_in", oauth2_settings.ACCESS_TOKEN_EXPIRE_SECONDS
)
Bagas
To hard for override settings :(
Bagas
In old version :
token['expires_in'] = oauth2_settings.ACCESS_TOKEN_EXPIRE_SECONDS
Sai
Any good book for ORM operation other than ORM cook book
Anonymous
How to add google maps (or any maps) to our app. It should be interactive.. Ability to mark a range ..etc
Anonymous
Sai
Anonymous
Okay..
Anonymous
How to run processes out of the request - response cycles?
Anonymous
Thanks..
محمد دلشاد
tough but better and in my opinion best
Pankaj
my clients requirements is admin dashboard. how can i give him a goog user friendly admin dashboard. any suggestions... for implementations. as i am not very experienced..
Milan
MS
Hey is there any good source for understanding REST api with django?
Milan
MS
Rocky
any one help me, I'm hosting django app on AWS its working fine when we type public ip address but I'm not able to link godaddy domain
Rocky
it's show DisallowedHost
Rocky
But still change tho ALLOWED_HOST = correctly
Rocky
Help me guy's
Pankaj
Endless Life
hello guys,
I am new to Django. Anyone can say me how to host my Django project with aws or any other hosting platforms?
Endless Life
or send me a guide or tutorial for me pls
Pankaj
Anonymous
Endless Life
Milan
AliReZa
why my media files isnt upload
Ram Kumar Shukla
How can I upload media files in production ?
Anonymous
Facing problem with database models after deploying to heroku, please help me https://stackoverflow.com/q/63616555/10527398?sem=2 
Deepak
Deepak
heroku run bash
python manage. py makemigrations
python manage.py migrate
Anonymous
I have done it already and it says no changes detected
R.U.S.H.A.B.H
I'm new to django and want to develop teacher allocate presentation topic to group of students and students can watch the topic allocation... Anyone here is there for my help thanks in advance 😄😄
Deepak
R.U.S.H.A.B.H
Anonymous
Anonymous
Can anyone help resources link for deployment Django online.
KJ
Heroku
L
Hello there everyone!
I'm making tests for my Django app with pytest and I'm having the following problem :
I need to test my Transaction model which is related to my Currency model through a ForeignKey field (if I'm not wrong, this is a many-to-one relationship). But I can't create a Transaction object if I haven't before created a Currency object. As of my understanding, I should use something called Mock/Patch to mimic a Currency instance in order to isolate my Transaction model in the test. Yet I don't know how to do that.
Let me share with you a screenshot of what I have so far:
L
class TestTransactionModel:
@pytest.mark.django_db
def test_transaction_create(self):
transaction = mixer.blend(Transaction)
assert Transaction.objects.last().id == transaction.id
PRASANA
Pip freeze > requirements.txt...when I cmd this in terminal , I got every library...but I need only particular project..
PRASANA
In django project
Aryan
@Prasana5 pip freeze requirements.txt | grep package_name
Muflone
Rohan
How is this relevant to the topic?