Skip to content
Advertisement

Tag: django

no such table: wagtailcore_site

I’m hosting two websites on ubuntu server and both having postgresql, the first one is working prefect but the second give me this error no such table: wagtailcore_site Request Method: GET Django Version: 2.2.10 Exception Type: OperationalError Exception Value: no such table: wagtailcore_site Exception Location: /home/project2/.venv/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py in execute, line 383 Python Executable: /home/project2/.venv/bin/python3.7m Python Version: 3.7.3 database settings for first

Django Error – unsupported operand type(s) for -: ‘str’ and ‘int’

I have a Django code that must do some math, but I continuously get the following error: unsupported operand type(s) for -: ‘str’ and ‘int’ Here is the code: Here is also the URL where I want to get “nor” from: http://localhost:8000/mechanical/?nor=4&mc=yes&repaired=no&submit=Submit Answer Query string params are always string, you need to convert them to desired type. Here you need

putting a pandas dataframe inside a django template

I want to put a pandas dataframe inside a django template. For instance I want something like this: What I have tried are these codes. First in my django views.py, this was my function: The template is: And, the style.css is: Apparently, when I check it in my browser the template is loaded with the CSS code correctly but it

ModuleNotFoundError: No module named ‘bootstrap4’

I installed bootstrap4 with $ pip install django-bootstrap4 It is being installed in this directory C:Userstradetechpit-match-envLibsite-packages Django seems to be looking at this directory C:UserstradeAnaconda3libsite-packagesdjango When I put ‘bootstrap4’ in the INSTALLED_APPS = (‘bootstrap4’) variable and then run $ python manage.py runserver I get this error How can I resolve this error? I installed bootstrap4 in the django folder by

Advertisement