The last line of the error message tells you what to do. Create a Secret Key in your settings.py file because it says it is now empty.
On Wednesday, 08 August, 2018 02:43 PM, Ramandeep Kaur wrote:
when i run this ./manage.py makemigrations it gives some error. Don't know what to do.
Traceback (most recent call last):File "manage.py", line 10, in <module>execute_from_command_line(sys.argv)File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 353, in execute_from_command_lineutility.execute()File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 345, in executeself.fetch_command(subcommand).run_from_argv(self.argv)File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 195, in fetch_commandklass = load_command_class(app_name, subcommand)File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 39, in load_command_classmodule = import_module('%s.management.commands.%s' % (app_name, name))File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module__import__(name)File "C:\Python27\lib\site-packages\django\core\management\commands\makemigrations.py", line 8, in <module>from django.db.migrations.autodetector import MigrationAutodetectorFile "C:\Python27\lib\site-packages\django\db\migrations\autodetector.py", line 13, in <module>from django.db.migrations.questioner import MigrationQuestionerFile "C:\Python27\lib\site-packages\django\db\migrations\questioner.py", line 12, in <module>from .loader import MigrationLoaderFile "C:\Python27\lib\site-packages\django\db\migrations\loader.py", line 10, in <module>from django.db.migrations.recorder import MigrationRecorderFile "C:\Python27\lib\site-packages\django\db\migrations\recorder.py", line 12, in <module>class MigrationRecorder(object):File "C:\Python27\lib\site-packages\django\db\migrations\recorder.py", line 26, in MigrationRecorderclass Migration(models.Model):File "C:\Python27\lib\site-packages\django\db\migrations\recorder.py", line 27, in Migrationapp = models.CharField(max_length=255)File "C:\Python27\lib\site-packages\django\db\models\fields\__init__.py", line 1072, in __init__super(CharField, self).__init__(*args, **kwargs)File "C:\Python27\lib\site-packages\django\db\models\fields\__init__.py", line 166, in __init__self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACEFile "C:\Python27\lib\site-packages\django\conf\__init__.py", line 55, in __getattr__self._setup(name)File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 43, in _setupself._wrapped = Settings(settings_module)File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 120, in __init__raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.--
On Wed, Aug 8, 2018 at 6:22 AM, Gerald Brown <gsbrown43@gmail.com> wrote:
Just delete the code in models.py and run ./manage.py makemigrations and ./manage.py migrate.
On Wednesday, 08 August, 2018 01:14 AM, Ramandeep Kaur wrote:
My question is that how to delete models in django?--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com .
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/42e646fa- .af94-4250-b04a-5765e2975c3e% 40googlegroups.com
For more options, visit https://groups.google.com/d/optout .
To view this discussion on the web visit https://groups.google.com/d/--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com .
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
msgid/django-users/ebb428c7- .b1cd-46e2-e139-9fe96a884353% 40gmail.com
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAL18nxmkKT9JPrvxnzQ3n1hs-KXXEUzBSX0YYqr-PP69K_PPJw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment