Console j line7/12/2023 ![]() # more details on how to customize your logging configuration. # the site admins on every HTTP 500 error when DEBUG=False. # performed by this configuration is to send an email to # Uncomment the next line to enable admin documentation: # Uncomment the next line to enable the admin: # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Python dotted path to the WSGI application used by Django's runserver. # Uncomment the next line for simple clickjacking protection: # List of callables that know how to import templates from various sources. # Make this unique, and don't share it with anybody. # List of finder classes that know how to find static files in # Don't forget to use absolute paths, not relative paths. # Always use forward slashes, even on Windows. # Put strings here, like "/home/html/static" or "C:/www/django/static". # in apps' "static/" subdirectories and in STATICFILES_DIRS. # Don't put anything in this directory yourself store your static files # Absolute path to the directory static files should be collected to. # URL that handles the media served from MEDIA_ROOT. # Absolute filesystem path to the directory that will hold user-uploaded files. # If you set this to False, Django will not use timezone-aware datetimes. # calendars according to the current locale. # If you set this to False, Django will not format dates, numbers and ![]() # to load the internationalization machinery. ![]() # If you set this to False, Django will make some optimizations so as not # In a Windows environment this must be set to your system time zone. ![]() # although not all choices may be available on all operating systems. 'PORT': '', # Set to empty string for default. 'HOST': '', # Set to empty string for localhost. 'NAME': '/Users/azbpolo/projects/sqlite3.db', # Or path to database file if using sqlite3. 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. The main changes made in the tutorial were adding the 'polls' app to the INSTALLED_APPS and setting a path for the database. Here is the code to my settings.py file, hopefully it is helpful. Please help me understand how to fix my app to allow me to import Choice, and understand the model, shell, import structure better. when I enter the first line of code to the shell from polls.models import Poll, ChoiceĬhoice is a model I have created in the polls app class Choice(models.Model):Ĭhoice = models.CharField(max_length=200) I have made it through the initial setup and am at the section "Playing with the API". I am working through the Django tutorial found at. ![]()
0 Comments
Leave a Reply. |