How can extra context be passed to django-crispy-forms field templates?

Inspecting the field.html template in the bootstrap3 template pack of django-crispyforms, I noticed an additional context variable, "tag", referenced. You can see this on line 12 and line 41 of...

Django-CKEditor with normal Django Forms and bootstrap

I'm new to Django and CKEditor and had been struggling with integration of Django-CKEditor in forms from past 1 week. It works perfectly fine in Django Admin forms but does not work in normal...

Getting TemplateDoesNotExist error when using bootstrap3 as template pack for crispy forms

I am using django-crispy-forms for my django project, and reading in the documentation I saw that to be able to use bootstrap3 features (like horizontal forms), I need to set bootstrap3 as my...

ImportError: No module named bootstrap3 even while using virtualenv

After installing bootstrap3 by $ pip install django-bootstrap3 while my virtualenv was active. i.e. (venv)[email protected]:~/Documents/DjangoProjects/venv/bin$ pip install...

Django 1.7 Changed name of template now TemplateDoesNotExist Error

So I changed the name of my registration template from user_form.html to register.html. I've also changed it in the urls.py file to reflect the new name, however when I try to go to the register...

How can I add javascript file to my ModelForm in django?

I want to display a separate div tags based on the selection of dropdown, I am using ModelForm to create my template. I am not sure how to add a javascript in my ModelForm. forms.py class...

Django login error: "attempt to write a readonly database"

I'm trying to setup Apache(2.4, built from sources)+Django(1.8.12) on CentOS 6, but when i try to login to my site or create user or something else that writes to DB, i get an error: attempt to...

Why bootstrap doesn't work although I have loaded it, etc. (Django project)?

I'm working on this Django project. The functionality works perfectly fine. When I started working on the front-end using Bootstrap3, I ran into some issues (more like confusions). First, I...

Django Allauth Error: NoReverseMatch at /accounts/facebook/login/token/

When trying to login using the fb js_sdk I receive the below error. However using oauth2 works fine when I switch back to using it. Am I missing some configuration somewhere? Internal Server...

inline form with django crispy form

I'm sorry but I just don't get it, the docs here are pretty awesome, and I'm using practically the same example, I just have two fields, that I want do display inline, but it's just does not...

You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path

I have gone through every other answer and cannot seem to get anything to work for me. I am following a tutorial and trying to push my master branch to heroku and get the error You're using the...

Django form - django-bootstrap-datepicker-plus is not rendering datepicker

I have some inconvenience when I try render django-bootstrap-datepicker-plus widget according to this answer. Everything works fine but the Datepicker does not show up. My Django version is 1.10.7...

Django 1.11: Error during template rendering , __str__ returned non-string (type NoneType)

Django Version: 1.11 Python Version: 3.5 I am trying to follow a Django tutorial and I have a problem that I can not solve, I can not remove this error Exception Type: TypeError at...

Django - How to make the topics, that you create public? Learning Log Project

The Problem I'm trying to make a project, where you can make topics, that can be private or public to unauthenticated users. In every topic, you can then make several entries, applying to that...

Python cannot be push to Heroku

I try to deploy a Django app to Heroku and the push get rejected. The result shows that : Push rejected, failed to compile Python app. From the error script, it seems that the model "ConfigParser'...

Typical "relation "auth_user" does not exist" with PSQL and Django 2

Edit: SOLVED I had a line like creator = models.ForeignKey(User, on_delete=models.CASCADE, default=User.objects.first().id) that was the problem. When I changed it to creator =...

Django admin failing to login after upgrade to 2.1

After upgrading an old Django 1.8 to 2.1, when I try to login on my admin site, I get a 404 with message: Using the URLconf defined in <mysite>.urls, Django tried these URL patterns, in this...

Could not find a version that satisfies the requirement ItsDangerous==1.0.0. Django, Pythonanywhere

When I try to deploy my application to pythonanywhere, the following error it is returned. Could not find a version that satisfies the requirement ItsDangerous==1.0.0 How can I solve it? I...

bootstrap.min.js:6 Uncaught Error: Bootstrap's JavaScript requires jQuery at bootstrap.min.js:6. Django. Bootstrap 3

I use Bootstrap 3 in my project, but I still see the error: bootstrap.min.js:6 Uncaught Error: Bootstrap's JavaScript requires jQuery at bootstrap.min.js:6 My template looks like this: {#...

CentOS Python, mod_wsgi is not working properly

I want to deploy Djanogo Celery application, and I encountered error ModuleNotFoundError: No module named Xyz but when I go to folder where is manage.py is and run python3 manage.py runserver I...

Revoke-token error in oauth2 Django Oauth2

I have such a trouble I can't do revoke-token command in oauth2 django convert-token works good,and i don't understand why,they are quite similar I call each command with PostMan,but second don't...

heroku error: "failed to push some refs to 'https://git.heroku.com/pacific-refuge-35090.git'

I'm trying to get my project pushed onto heroku but I am getting this error and I'm not sure why. I was initially getting a different error, but I think it was due to not having requirements.txt...

" Error while running '$ python manage.py collectstatic --noinput" even though I have my static_root set

So, I already have my static root set, I did manage.py collectstatic so I am not sure what I am doing wrong here. I am trying to push everything to heroku, and I keep getting this error about...

wagtail collectstatic is failing

I'm using python 3.7 , wagtail 2.10 After: python manage.py collectstatic I have the errors below. My insite about the issue is that there is a Django related problem about STATICFILES_STORAGE =...

Generic detail view UserProfileDetailView must be called with either an object pk or a slug in the URLconf

Well I am facing error and it's now its been two days to this question and still stuck on this mistake, anybody can help and able to fix this. I am new in Django and need help. I shall be...

Cannot fix django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet

I run the following line of code on a Docker container: RUN python3 manage.py sitetree_resync_apps --settings=sites.production.settings and I get the following error: Traceback (most recent call...

ImproperlyConfigured: 'sql_server.pyodbc' isn't an available database backend in CentOS7

I have already tried out all the suggestions in other posts. I am trying to connect SQL Server to Django on a Linux CentOS 7 with a virtual environment. I am getting the following error: )...

NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5b25bc24e0>: Failed to establish a new connection: [Errno 111] ',))

I have kyc form and when fill all fields and click on submit button then I see the following traceback. Environment: Request Method: POST Request URL: http://127.0.0.1:8000/kyc/kyc Django...

Conflicting with version dependencies when running pip install

Having issues with version dependencies when running pip install on docker. However, when installing on my mac without docker and just virtualenv, works perfectly fine. These are the versions I...

How to correctly install PyICU on Heroku?

I am trying to deploy my Python app on Heroku, but have been unsuccessful. It seems that a problem is occurring with the PyICU package, which I'm unsure how to correct. I've confirmed that this is...