Mahendra
Hi all, I am writing the Django admin OTP code in project folder (settings.py and URLs.py ) it's work fine local server on computer but after host my project in pythonanywhere.com admin login well but not working totp device login Here is my code : settings.py ----------------- INSTALLED_APPS = [     'django_otp',     'django_otp.plugins.otp_totp' ] MIDDLEWARE = [django_otp.middleware.OTPMiddleware' ] URLs.Py --------- from django_otp.admin import OTPAdminSite admin.site.__class__ = OTPAdminSite urlpatterns = [ path('admin/', admin.site.urls), ] Please help me
SuperN00b
Some? Lol who can debug with this message ?
Mahendra
Error mesage ?
Something went wrong
himay
Hello How to find ovals position form pdf
KYRILA
hello, can't find pub_date?
KYRILA
def str(self): return self.question_text from django.db import models import datetime from django.utils import timezone class Question(models.Model): question_text = models.CharField(max_length=200) pub_date = models.DateTimeField('date published')def was_published_recently(self): self.pub_date = Question.pub_date return self.pub_date >= timezone.now() - datetime.timedelta(days=1) class Choice(models.Model): question = models.ForeignKey(Question, on_delete=models.CASCADE) choice_text = models.DateTimeField(max_length=200) votes = models.IntegerField(default=0) def str(self): return self.choice_text
pavan
Hi all,Anyone have idea how to give checkbox for files.Im selecting all the files from folder and i have to give checkbox for drop-down list of files and when i select then it will take as input
bala
Hi everyone
bala
I can't delete a row
bala
Actually iam working in a project where we can see details of a person like name address and their age
bala
When I choose to delete a person's info... It shows unbound error
Tb10
Doragonsureiyā
Hello How to find ovals position form pdf
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Nowraa
Hi Anyone can help my to do event calendar with Django🥺
Nowraa
what kind of help do you need?
I'm new to the field and I want to know how I do it
Eslam
hi guys how i can Show most viewed products
R.
I'm new to the field and I want to know how I do it
You can Google and find already made projects of calendar with events, in Django and Python . You can also search Github. Good luck.
R.
hi guys how i can Show most viewed products
I guess, you would have to count and store in your database everytime a product is viewed, then you would have to make a query to your DB to search for most viewed products.
Eliana
I am trying to run django on google colab. As my views file contains long running process. It is giving time-out error. Can anyone help me with this issue? I have googled it but could not understand any solution given
(⌐■-■)
*on
Eliana
Because my machine doesn't have enough size graphics card to run the model
Eliana
we are running it on google colab
Eliana
gpu
Eliana
https://stackoverflow.com/questions/1582708/long-slow-operation-in-django-view-causes-timeout-any-way-for-python-to-speak I think this website has the solution. but ajax in django is something I am not able to understand.. Can anyone explain?
(⌐■-■)
I see. https://stackoverflow.com/questions/45459738/django-long-request-timeout Maybe this might help
Vivu
Hello 👋, i m creating a file uploading project, i have added MEDIA_ROOT winPAth to the directory, and in my models i define models.FileFiled(upload_to = sunDirectries) But when I am adding file with django admin it's showing an error, => [WinError] The system can not find the path specified Help me to resolve
Eliana
I could not find gunicorn
Anonymous
is Django only used for web development?
Mirco
is Django only used for web development?
Yes , it's a web framework
Anonymous
Yes , it's a web framework
Can we use django for backend part of mobile application?
Vadim
How to display a text message on page load (Please wait loading). There is views.py and it contains a function that sends data in COM format to another database.And while sending, display a text message (Wait).I know that you need to use ajax, I do not fully understand how to implement it.
Vadim
Frontend portion
Thanks bro, how did I not think of this before
(⌐■-■)
🧠 u dropped this.
(⌐■-■)
No offense 😅
Monde
hi guys has anyone used the django-ckeditor lib if so, any ideas on how to remove the <p> dags from my paragraphs ?
Monde
Yeah
can use it as back end for PWA's
Anonymous
How to style django's default form inside registration/login.html
Mirco
No
Don't give bad advices, it's possible Instagram mobile web version is a PWA powered by REST APIs
Piyush
Hi bro i have a problem Can any please help me When i put value in foreign key It's show correct value But! When i put value in another foreign key It is showing none value Why...?
Doragonsureiyā
Hi bro i have a problem Can any please help me When i put value in foreign key It's show correct value But! When i put value in another foreign key It is showing none value Why...?
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Syed
Although he used correct column name
Hossein.A
is Django only used for web development?
In fact for backend development
Emn
Hi I have a question about Django: I would like to make the information entered without submiting a form? Thanknotes
rtg
Can I configure Django proyecto connecting to SQL Server database located in another virtual machine? Example: Django web in virtual machine 192.168.0.200 and SQL Server in another virtual machine 192.168.0.201
rtg
Is this posible?
rtg
Thanks!
Emn
Wut?
I want the information to be saved inside the fields without pressing the submit button. Is this possible?
Doragonsureiyā
rtg
Yes
How can i configure database conection?
Mirco
How can i configure database conection?
DATABASES setting in settings file
rtg
yes, but host with another virtual machine IP?
Mirco
yes, but host with another virtual machine IP?
Just put that IP in HOST if the db is exposed
rtg
host=192.168.0.201 user=USER dbname=NAME port=5432
rtg
ok?
Doragonsureiyā
ok?
Maybe
Mirco
ok?
Yes if those are the correct connection info of your db I'd try to connect with psql first or whatever you use with your kind of db
rtg
(It is only educational)
cj
I use postgresql y another project. Now i need to use SqlServer2019Express
don't use SQL Server with Django (neither with Python).. it's a headache and you'll lose your time for nothing
Mirco
(It is only educational)
Don't do it with SQL server 😅
rtg
I am interested in testing with SQL Server because automation technology systems (for example water installations) use SQL Server. I want to prove that a Django website can replace expensive control programs.
Эльдар
Hey. What’s means (Error Missing requirements flag: -a, —app APP) (Heroku) how to fix it? Thanks
rtg
Do you think it is a very bad idea to promote django in this way? Possibly postgresql can be used, but large amounts of data will be stored on the server. Which do you consider the most suitable?
cj
I am interested in testing with SQL Server because automation technology systems (for example water installations) use SQL Server. I want to prove that a Django website can replace expensive control programs.
sadly, SQL Server is a bad player with Python, adding that the libraries needed to use SQL Server are outdated and nobody maintains them ¯\_(ツ)_/¯