Jamil
Hey guys
Jamil
I am working with token authentication
Jamil
and i have this parameter, attrs in my validate
Jamil
function what is it
Shreehari
But workable
with mongo ?
Shreehari
With mongo its dead slow each query takes 3 secs to execute. with sqllite it takes 5ms
Shreehari
using djongo engine
Shreehari
what about mysql?
Its working fine with it too
kancharla
I am using os.path.join(BASE_DIR,'media') for loading static images Will it work if host this site on any hosting platforms
kancharla
Guys does any one know about it
Biswajeet
If the path is correct , you can use it
Darth✧
https://dpaste.org/01bM
Darth✧
NoReverseMatch at / Reverse for 'room' with no arguments not found. 1 pattern(s) tried: ['room_app/(?P<room_name>[^/]+)/$']
Darth✧
https://dpaste.org/01bM
I m facing this error when redirecting to a url ...Here is the code
R
I m facing this error when redirecting to a url ...Here is the code
Try to remove "/" from the end of 'room' url pattern
R
same error
Can you show your html template?
Darth✧
Can you show your html template?
https://dpaste.org/1KW7
R
https://dpaste.org/1KW7
Change 14 line on " <a href="{% url 'room' room_name %}"></a> "
R
Since you not pass argument "room_name" in your pattern(which is neccessary) django raise exception
Darth✧
Reverse for 'room' with arguments '('',)' not found. 1 pattern(s) tried: ['room_app/(?P<room_name>[^/]+)$']
Darth✧
Solved
Darth✧
I used that tag
Darth✧
Thank you @sparkjet
R
😊
thieri
Hello here, please how to establish a communication via WhatsApp using python Language or Django if possible?
Niko
Hello everyone, i am new to Django so if someone can help me it would be much appreciated 🙂 i have to create a “Customer” model with a user_id field in it, i did it simply by defing a user field in Customer class like this (user = models.OneToOneField(User, on_delete=models.CASCADE, primary_key=True)) but i was told i should use Django’s user and link it to my customer model, how can i do that ? thanks
thieri
bs the help or Twilio
Please go does Twilio work?
Ganesh
Name error : name 'date ' is not defined
Ganesh
After importing date time also these error is occurring
Ganesh
Can anyone help
Paul
Hi, can someone suggest article about testing drf's viewsets with pytest?
thieri
Please go does Twilio work?
*how does Twilio work?
Mohd
Please go does Twilio work?
check out this link https://youtu.be/98OewpG8-yw
Dheeraj
with mongo ?
Django is kinda optimised for working with relational databases. That's why I guess the name ORM (Object Relational Mapping) If possible, move on to a relational DB .....
Dheeraj
Not an expert..... So I might not have complete information.... Feel free to correct me.....
Niko
At first you should have already existing user, create it and after that create customer model passing in user field User model instance like this Customer(user=SomeUser)
class Customer(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, primary_key=True) phone = models.IntegerField() deleted = models.BooleanField company = models.ForeignKey('Customer', on_delete=models.CASCADE) this is the code, i thought this was right, so what should i change?
Doragonsureiyā
class Customer(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, primary_key=True) phone = models.IntegerField() deleted = models.BooleanField company = models.ForeignKey('Customer', on_delete=models.CASCADE) this is the code, i thought this was right, so what should i change?
To share code or error tracebacks please use an online pasting service, here is a list of suggested sites: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev
Niko
At first you should have already existing user, create it and after that create customer model passing in user field User model instance like this Customer(user=SomeUser)
is this not right? class Customer(models.Model): user = models.OnetoOneField(User, on_delete=models.CASCADE, primary_key=True)
Ganesh
NameError: name 'date' is not defined
Ganesh
can anyone tell why this error occuring even importing datetime
Ganesh
Show your code
def handle(self, *args, **options): current_date = date.today() if date(year=current_date.year, month=2, day=15) < current_date < date(year=current_date.year, month=7, day=30): semester_season_id = 2 semester_year = current_date.year elif date(year=current_date.year, month=8, day=1) < current_date < date(year=current_date.year, month=12, day=31): semester_season_id = 4 semester_year = current_date.year elif date(year=current_date.year, month=1, day=1) < current_date < date(year=current_date.year, month=2, day=14): semester_season_id = 4 semester_year = current_date.year - 1
Ganesh
Show your code
https://dpaste.org/Y9sg#L
Anonymous
how to deploy django project
AKASH
Where
ZK
how to deploy django project
Use pythonanywhere.com It will host your site for 3 months for free
isa
what is your favorite database browser for mysql on ubuntu ?
Anonymous
dbeaver
Shreehari
Thanks
decaf
hello people
decaf
i want to display a list of chatrooms using django channels. is there any way to implement this?
Mirco
!meta
Doragonsureiyā
Please don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello I need help on $z" Just ask about your problem directly! With a very high amount of people here the probability that someone will help is pretty high. Also please read: http://catb.org/~esr/faqs/smart-questions.html
Maxat
hello everybody
Vorke
I have a question, i have two django apps 1. app 2. api app has a Model videos, which i would like to use in the api-app for retrieving videos on a mobile application. Question is what is the best approch, should i create a different Model (video) in the api-app or there is a way to link the app->model to the api-app
Roman
operator does not exist: text % text HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Roman
Hi
Roman
Can you give me a hint what is wrong with it ?
Bheeshma
I want to develop a user module with Admin & Multi-vendor users.
Vorke
Which approach have you tried, implement the one's you know
Having two apps in my scenario would have been cumbersome, i decided to just use one app for both mobile (api) and web backend
Shiven
Can anyone suggest Django framework book that is better than rest of the books in the market?
Ram Kumar Shukla
How to write TestCases for super functions in Django model method?