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
SuperN00b
Some? Lol who can debug with this message ?
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🥺
Maxim
Eslam
hi guys how i can Show most viewed products
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
(⌐■-■)
Vivu
Eliana
Eliana
I could not find gunicorn
Anonymous
is Django only used for web development?
Mirco
Mirco
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.
(⌐■-■)
Heet Raval
(⌐■-■)
🧠 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
Mirco
Anonymous
How to style django's default form inside registration/login.html
Heet Raval
Heet Raval
Mirco
No
Don't give bad advices, it's possible
Instagram mobile web version is a PWA powered by REST APIs
Heet Raval
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...?
Syed
Syed
Although he used correct column name
Hossein.A
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!
Avvi Rapper
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
rtg
yes, but host with another virtual machine IP?
rtg
host=192.168.0.201
user=USER
dbname=NAME
port=5432
rtg
ok?
Doragonsureiyā
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
rtg
(It is only educational)
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?
Mirco
cj