when i run my manage.py server its giving me invalid syntax error.
  File "C:\Users\Dell\vms2\vms2\settings\base.py", line 18
    from .base import *pip install django-generate-secret-key
                         ^
SyntaxError: invalid syntax


On Thu, Aug 9, 2018 at 12:14 PM, Mike Dewhirst <mi...@dewhirst.com.au>
wrote:

> Ok. If it is saying the secret key is empty and you have spelled
> SECRET_KEY correctly and it is not empty then manage.py is loading the
> wrong settings.
>
> Does manage.py runserver work?
>
>
> On 9/08/2018 3:48 PM, Ramandeep Kaur wrote:
>
>> Thanks but again getting same error.
>> PS C:\Users\Dell\vms2> python manage.py makemigrations
>> --settings=vms2.settings
>> 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_line
>>     utility.execute()
>>   File "C:\Python27\lib\site-packages\django\core\management\__init__.py",
>> line 345, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File "C:\Python27\lib\site-packages\django\core\management\__init__.py",
>> line 195, in fetch_command
>>     klass = load_command_class(app_name, subcommand)
>>   File "C:\Python27\lib\site-packages\django\core\management\__init__.py",
>> line 39, in load_command_class
>>     module = 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 MigrationAutodetector
>>   File "C:\Python27\lib\site-packages\django\db\migrations\autodetector.py",
>> line 13, in <module>
>>     from django.db.migrations.questioner import MigrationQuestioner
>>   File "C:\Python27\lib\site-packages\django\db\migrations\questioner.py",
>> line 12, in <module>
>>     from .loader import MigrationLoader
>>   File "C:\Python27\lib\site-packages\django\db\migrations\loader.py",
>> line 10, in <module>
>>     from django.db.migrations.recorder import MigrationRecorder
>>   File "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 MigrationRecorder
>>     class Migration(models.Model):
>>   File "C:\Python27\lib\site-packages\django\db\migrations\recorder.py",
>> line 27, in Migration
>>     app = 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_TABLESP
>> ACE
>>   File "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 _setup
>>     self._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.
>> PS C:\Users\Dell\vms2> python manage.py makemigrations
>> --settings=vms2.settings
>> 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_line
>>     utility.execute()
>>   File "C:\Python27\lib\site-packages\django\core\management\__init__.py",
>> line 345, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File "C:\Python27\lib\site-packages\django\core\management\__init__.py",
>> line 195, in fetch_command
>>     klass = load_command_class(app_name, subcommand)
>>   File "C:\Python27\lib\site-packages\django\core\management\__init__.py",
>> line 39, in load_command_class
>>     module = 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 MigrationAutodetector
>>   File "C:\Python27\lib\site-packages\django\db\migrations\autodetector.py",
>> line 13, in <module>
>>     from django.db.migrations.questioner import MigrationQuestioner
>>   File "C:\Python27\lib\site-packages\django\db\migrations\questioner.py",
>> line 12, in <module>
>>     from .loader import MigrationLoader
>>   File "C:\Python27\lib\site-packages\django\db\migrations\loader.py",
>> line 10, in <module>
>>     from django.db.migrations.recorder import MigrationRecorder
>>   File "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 MigrationRecorder
>>     class Migration(models.Model):
>>   File "C:\Python27\lib\site-packages\django\db\migrations\recorder.py",
>> line 27, in Migration
>>     app = 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_TABLESP
>> ACE
>>   File "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 _setup
>>     self._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 Thu, Aug 9, 2018 at 11:13 AM, Mike Dewhirst <mi...@dewhirst.com.au
>> <mailto:mi...@dewhirst.com.au>> wrote:
>>
>>     On 9/08/2018 3:11 PM, Ramandeep Kaur wrote:
>>
>>>     i set the secret key but its again giving me the same errror.
>>>     django.core.exceptions.ImproperlyConfigured: The SECRET_KEY
>>>     setting must not be empty.
>>>
>>
>>     Try running the migrations command with the settings option so
>>     manage.py can find them.
>>
>>     python manage.py makemigrations --settings=<project.settings>
>>
>>
>>
>>>     On Wed, Aug 8, 2018 at 7:24 PM, Matthew Pava
>>>     <matthew.p...@iss.com <mailto:matthew.p...@iss.com>> wrote:
>>>
>>>         Well, you could generate a SECRET KEY here:
>>>
>>>         https://www.miniwebtool.com/django-secret-key-generator/
>>>         <https://www.miniwebtool.com/django-secret-key-generator/>
>>>
>>>         Then in your settings.py file you need to add this line:
>>>
>>>         SECRET_KEY = “[insert secret key here]”
>>>
>>>         https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
>>>         <https://docs.djangoproject.com/en/dev/ref/settings/#secret-key>
>>>
>>>         *From:*django-users@googlegroups.com
>>>         <mailto:django-users@googlegroups.com>
>>>         [mailto:django-users@googlegroups.com
>>>         <mailto:django-users@googlegroups.com>] *On Behalf Of
>>>         *Ramandeep Kaur
>>>         *Sent:* Wednesday, August 8, 2018 8:50 AM
>>>         *To:* django-users@googlegroups.com
>>>         <mailto:django-users@googlegroups.com>
>>>         *Subject:* Re: django models
>>>
>>>         I am new at Django so I don't know how to create secret key.
>>>         please explain me.
>>>
>>>         On Wed, Aug 8, 2018, 1:20 PM Gerald Brown
>>>         <gsbrow...@gmail.com <mailto:gsbrow...@gmail.com>> wrote:
>>>
>>>             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_line
>>>
>>>                     utility.execute()
>>>
>>>                   File
>>>                 "C:\Python27\lib\site-packages\django\core\management\__
>>> init__.py",
>>>                 line 345, in execute
>>>
>>>
>>>                 self.fetch_command(subcommand).run_from_argv(self.argv)
>>>
>>>                   File
>>>                 "C:\Python27\lib\site-packages\django\core\management\__
>>> init__.py",
>>>                 line 195, in fetch_command
>>>
>>>                     klass = load_command_class(app_name, subcommand)
>>>
>>>                   File
>>>                 "C:\Python27\lib\site-packages\django\core\management\__
>>> init__.py",
>>>                 line 39, in load_command_class
>>>
>>>                     module =
>>>                 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
>>>                 MigrationAutodetector
>>>
>>>                   File
>>>                 "C:\Python27\lib\site-packages
>>> \django\db\migrations\autodetector.py",
>>>                 line 13, in <module>
>>>
>>>                     from django.db.migrations.questioner import
>>>                 MigrationQuestioner
>>>
>>>                   File
>>>                 "C:\Python27\lib\site-packages
>>> \django\db\migrations\questioner.py",
>>>                 line 12, in <module>
>>>
>>>                     from .loader import MigrationLoader
>>>
>>>                   File
>>>                 "C:\Python27\lib\site-packages
>>> \django\db\migrations\loader.py",
>>>                 line 10, in <module>
>>>
>>>                     from django.db.migrations.recorder import
>>>                 MigrationRecorder
>>>
>>>                   File
>>>                 "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 MigrationRecorder
>>>
>>>                     class Migration(models.Model):
>>>
>>>                   File
>>>                 "C:\Python27\lib\site-packages
>>> \django\db\migrations\recorder.py",
>>>                 line 27, in Migration
>>>
>>>                     app = 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_TABLESPACE
>>>
>>>                   File
>>>                 "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 _setup
>>>
>>>                     self._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
>>>                 <gsbrow...@gmail.com <mailto:gsbrow...@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+unsubscr...@googlegroups.com
>>>                     <mailto:django-users+unsubscr...@googlegroups.com>.
>>>                     To post to this group, send email to
>>>                     django-users@googlegroups.com
>>>                     <mailto:django-users@googlegroups.com>.
>>>                     Visit this group at
>>>                     https://groups.google.com/group/django-users
>>>                     <https://groups.google.com/group/django-users>.
>>>                     To view this discussion on the web visit
>>>                     https://groups.google.com/d/ms
>>> gid/django-users/42e646fa-af94-4250-b04a-5765e2975c3e%40googlegroups.com
>>>                     <https://groups.google.com/d/m
>>> sgid/django-users/42e646fa-af94-4250-b04a-5765e2975c3e%40goo
>>> glegroups.com?utm_medium=email&utm_source=footer>.
>>>                     For more options, visit
>>>                     https://groups.google.com/d/optout
>>>                     <https://groups.google.com/d/optout>.
>>>
>>>                 --                 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+unsubscr...@googlegroups.com
>>>                 <mailto:django-users+unsubscr...@googlegroups.com>.
>>>                 To post to this group, send email to
>>>                 django-users@googlegroups.com
>>>                 <mailto:django-users@googlegroups.com>.
>>>                 Visit this group at
>>>                 https://groups.google.com/group/django-users
>>>                 <https://groups.google.com/group/django-users>.
>>>
>>>                 To view this discussion on the web visit
>>>                 https://groups.google.com/d/ms
>>> gid/django-users/ebb428c7-b1cd-46e2-e139-9fe96a884353%40gmail.com
>>>                 <https://groups.google.com/d/m
>>> sgid/django-users/ebb428c7-b1cd-46e2-e139-9fe96a884353%40gma
>>> il.com?utm_medium=email&utm_source=footer>.
>>>
>>>
>>>
>>>                 For more options, visit
>>>                 https://groups.google.com/d/optout
>>>                 <https://groups.google.com/d/optout>.
>>>
>>>                 --                 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+unsubscr...@googlegroups.com
>>>                 <mailto:django-users+unsubscr...@googlegroups.com>.
>>>                 To post to this group, send email to
>>>                 django-users@googlegroups.com
>>>                 <mailto:django-users@googlegroups.com>.
>>>                 Visit this group at
>>>                 https://groups.google.com/group/django-users
>>>                 <https://groups.google.com/group/django-users>.
>>>                 To view this discussion on the web visit
>>>                 https://groups.google.com/d/ms
>>> gid/django-users/CAL18nxmkKT9JPrvxnzQ3n1hs-KXXEUzBSX0YYqr-
>>> PP69K_PPJw%40mail.gmail.com
>>>                 <https://groups.google.com/d/m
>>> sgid/django-users/CAL18nxmkKT9JPrvxnzQ3n1hs-KXXEUzBSX0YYqr-
>>> PP69K_PPJw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>>>                 For more options, visit
>>>                 https://groups.google.com/d/optout
>>>                 <https://groups.google.com/d/optout>.
>>>
>>>             --             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+unsubscr...@googlegroups.com
>>>             <mailto:django-users+unsubscr...@googlegroups.com>.
>>>             To post to this group, send email to
>>>             django-users@googlegroups.com
>>>             <mailto:django-users@googlegroups.com>.
>>>             Visit this group at
>>>             https://groups.google.com/group/django-users
>>>             <https://groups.google.com/group/django-users>.
>>>             To view this discussion on the web visit
>>>             https://groups.google.com/d/msgid/django-users/f04ab2c6-1eea
>>> -9430-f05c-a51b4f2d7fc0%40gmail.com
>>>             <https://groups.google.com/d/msgid/django-users/f04ab2c6-1ee
>>> a-9430-f05c-a51b4f2d7fc0%40gmail.com?utm_medium=email&utm_source=footer
>>> >.
>>>             For more options, visit
>>>             https://groups.google.com/d/optout
>>>             <https://groups.google.com/d/optout>.
>>>
>>>         --         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+unsubscr...@googlegroups.com
>>>         <mailto:django-users+unsubscr...@googlegroups.com>.
>>>         To post to this group, send email to
>>>         django-users@googlegroups.com
>>>         <mailto:django-users@googlegroups.com>.
>>>         Visit this group at
>>>         https://groups.google.com/group/django-users
>>>         <https://groups.google.com/group/django-users>.
>>>         To view this discussion on the web visit
>>>         https://groups.google.com/d/msgid/django-users/CAL18nx%3D5uz
>>> irrxr0kJAHKZ0B3ubHWo82e7hP5AjRNQO4ZeCRYw%40mail.gmail.com
>>>         <https://groups.google.com/d/msgid/django-users/CAL18nx%3D5u
>>> zirrxr0kJAHKZ0B3ubHWo82e7hP5AjRNQO4ZeCRYw%40mail.gmail.com?
>>> utm_medium=email&utm_source=footer>.
>>>         For more options, visit https://groups.google.com/d/optout
>>>         <https://groups.google.com/d/optout>.
>>>         --         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+unsubscr...@googlegroups.com
>>>         <mailto:django-users+unsubscr...@googlegroups.com>.
>>>         To post to this group, send email to
>>>         django-users@googlegroups.com
>>>         <mailto:django-users@googlegroups.com>.
>>>         Visit this group at
>>>         https://groups.google.com/group/django-users
>>>         <https://groups.google.com/group/django-users>.
>>>         To view this discussion on the web visit
>>>         https://groups.google.com/d/msgid/django-users/229da8adeb1d4
>>> fe7b006648c29decbcc%40ISS1.ISS.LOCAL
>>>         <https://groups.google.com/d/msgid/django-users/229da8adeb1d
>>> 4fe7b006648c29decbcc%40ISS1.ISS.LOCAL?utm_medium=email&utm_source=footer
>>> >.
>>>
>>>
>>>         For more options, visit https://groups.google.com/d/optout
>>>         <https://groups.google.com/d/optout>.
>>>
>>>
>>>     --     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+unsubscr...@googlegroups.com
>>>     <mailto:django-users+unsubscr...@googlegroups.com>.
>>>     To post to this group, send email to
>>>     django-users@googlegroups.com <mailto:django-users@googlegroups.com
>>> >.
>>>     Visit this group at https://groups.google.com/group/django-users
>>>     <https://groups.google.com/group/django-users>.
>>>     To view this discussion on the web visit
>>>     https://groups.google.com/d/msgid/django-users/CAL18nxnWMzzW
>>> 57wTv_%3DSutWLkkMyOfTzi3Xd5gu4LSH7N5N3Pg%40mail.gmail.com
>>>     <https://groups.google.com/d/msgid/django-users/CAL18nxnWMzz
>>> W57wTv_%3DSutWLkkMyOfTzi3Xd5gu4LSH7N5N3Pg%40mail.gmail.com?
>>> utm_medium=email&utm_source=footer>.
>>>     For more options, visit https://groups.google.com/d/optout
>>>     <https://groups.google.com/d/optout>.
>>>
>>
>>
>>
> --
> 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+unsubscr...@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/ms
> gid/django-users/011b3128-20de-04b5-2e19-607bbef75059%40dewhirst.com.au.
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@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/CAL18nxk0OHLTD3yueVog--00o6NjiVWxZEntEdGmtsg3%2BCzOrg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to