shamspias / customizable-gpt-chatbot

A dynamic, scalable AI chatbot built with Django REST framework, supporting custom training from PDFs, documents, websites, and YouTube videos. Leveraging OpenAI's GPT-3.5, Pinecone, FAISS, and Celery for seamless integration and performance.
357 stars 82 forks source link

get_user_model #20

Closed shubham184 closed 1 year ago

shubham184 commented 1 year ago
Exception in thread django-main-thread:
Traceback (most recent call last):
  File "C:\gptchat-env\Lib\site-packages\django\apps\config.py", line 235, in get_model
    return self.models[model_name.lower()]
           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
KeyError: 'user'

django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'users.User' that has not been installed

shamspias commented 1 year ago

please rename the users.User to users.CustomUser I will update the example.env

Valengou commented 1 year ago

You should also change it in the common.py file at the config-setting folders

shamspias commented 1 year ago

if anyone writes in .env the custom user model then they no longer need to change from config/settings/common.py