Anonymous
its saying no such table: main.auth_user_old
Anonymous
i m using django 2.0.7 with sqlite3
Anonymous
but it was working till yesterday. I am a newbie
Muflone
there was a bug in django 2.0 and 2.1 which corrupted relations. upgrade your django version, drop the database and execute migrations
Anonymous
i reinstalled django with latest version and ran the migration It doesn’t gave any help
Muflone
https://code.djangoproject.com/ticket/29182
Muflone
you have to drop the database but if you don't upgrade your django version it will break again
Muflone
migrate to django 2.2 or 3.0
Muflone
(there's not a 2.3 yet)
Anonymous
I upgraded to version 3.0 still not working
Muflone
it will not work until you drop the database it won't get fixed
Anonymous
Hi guys I need help , ı have 3 project 3 domain all project same and ı want same database all prpject .. its imposible ??
Anonymous
it will not work until you drop the database it won't get fixed
i did. Still not working. Anyways thanks for the help
Muflone
Anonymous
i firstly upgraded django in my virtualenv
Anonymous
then i deleted the server
Anonymous
then i ran migrations
Anonymous
the dbsqlite3 in the migrations folder
Muflone
I doubt your db lives in the migrations folder
Muflone
check your settings.py
Anonymous
sorry, in the same directory setting.py is jn
Anonymous
in****
Anonymous
not in migrations folder
Muflone
in your virtualenv execute: python -c 'import django; print(django.get_version())'
Anonymous
ohh thanks
Anonymous
it worked
Anonymous
actually my version wasn’t upgraded that tym. Thanks @il_muflone
Muflone
yep
Muflone
I had the issue when it was discovered and it took a lot of time to be fixed
Vidu
I created template folder inside a app folder.. but I got TemplateDoesNotExist message.. but after including the path for this template folder in settings.py-> templates, it works.. My problem is, why Django do not automatically look into those template directories in app folders?
Vidu
use app/template/app/filename.html
oh.. sorry.. I did't get that... this is the dirs value 'DIRS':[r'H:\Activities\Python\booktime\booktime\main\templates',]
Vidu
this is the view def index(request): return render(request, "home.html")
Muflone
what is the application name?
Vidu
avoid hardcoding the paths you should put templates into the application directory
mmm.. I tried to get away from that.. but didn't work and I could't find my issue.. (I have no much experience with Django) project name - booktime application name - main
Muflone
put your templates in main/templates/main folder
Vidu
same result.. settings.py TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], urls.py urlpatterns = [ path('', TemplateView.as_view(template_name="home.html")), path('admin/', admin.site.urls), ] views.py def index(request): return render(request, "home.html")```
Muflone
DIRS is empty ?
Vidu
DIRS is empty ?
yah... as I referred.. Django can look into app directories(in my case 'main') automatically without specifically include app template path values in DIRS Am I correct?
Ghorz
Paginate it
Metalcode
Pls who can help me with geodjango... I am having issue saving the data.
Metalcode
I am getting a gdal exception
Metalcode
Pls who can help me with geodjango... I am having issue saving the data.
I have install gdal and I have set library path both for gdal and geos library path..
Metalcode
I created a point field and registered it in admin.. I tried saving a point but got an error in return.
Felix
ok again: is it the common way to use request.POST[] and return this in the authentification function or shouldn’t it be validated via the Form? Like in my link https://pastebin.com/JJjr9HCJ
JZA
Wonder if there is a django package to easily switch templates, perhaps by switching the STATIC variable
Neo
do anyone know querry to search db for keywords and return top 5 matches sorted according to most keyword match
MG
How to connect Django project to MySQL database..
Abhishek Kumar
Hello everyone, i am learning django, going through official documentation i stucked at polls appliction part-4 , here is the link: https://docs.djangoproject.com/en/3.0/intro/tutorial04/, in polls/views.py it showing an error in line : except (KeyError, Choice.DoesNotExist) , and the error is: Class 'Choice' has no 'DoesNotExist' i tried to google it and also tried to use try/except in models.py but failed to resolved the problem. If anyone faced the same issue please reply
venkatesh
https://stackoverflow.com/questions/19189813/setting-django-up-to-use-mysql
Abhishek Kumar
Hello venkatesh o/
D4RK
Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment? Manage.py not run.
D4RK
Thanks
professor
https://stackoverflow.com/questions/59816877/randomly-select-from-a-set-of-questions
Felix
I'm not sure, but which LoginForm you're using? Are you implementing it yourself?
self implemented… just 2 fields (email and password), META class and one clean function for checking existance of an email
JZA
so I want to know landing pages just deal with 1 page, and usually there is no need for a backend, but wonder if I can componetize it in django... instead of pages treat it with 'areas'.
JZA
also I know that some frontpage load data on demand like the infinite scroll type effects.
JZA
wonder if they can 'get' this data through django's database
S
Guide me the simple project of django please ...
Dmitry
Guide me the simple project of django please ...
Github, and search "django"
Anonymous
like button . count. When the user clicks on the like button . The like button will increase by 1. only one like by user. ???
Abdulwahab
Anyone who works with Payfort (payment gateway) Integration with Django ?
Doragonsureiyā
Anyone who works with Payfort (payment gateway) Integration with Django ?
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 51k+ people the probability that someone will help is pretty high. Also please read: http://catb.org/~esr/faqs/smart-questions.html
Abdulwahab
!meta
Oh, I'm sorry
Doragonsureiyā
Oh, I'm sorry
Read the rules before any activity: @PythonRules
Abdulwahab
Is there a difference between sending a POST request from an html form and sending a POST request from 'requests' python library ? specially when communicating with a payment gateway such as Payfort
Alex
There is such a thing as form data encoding. The idea is that if you need to send form data together with a file, browsers will encode these data in special way.