I am completely new to Django. I created a class:
from django.db import models
from cqlengine import columns
class Rsvpstream(models.Model):
venue_name = columns.Text()
venue_lon = columns.Decimal(required=False)
venue_lat = columns.Decimal(required=False)
venue_id = columns.Integer()
visibility = columns.Text()
response = columns.Text()
guests = columns.Integer()
member_id = columns.Integer()
member_name = columns.Text()
rsvp_id = columns.Integer(primary_key=True)
rsvp_last_modified_time = columns.DateTime(required=False)
event_name = columns.Text()
event_time = columns.DateTime(required=False)
event_url = columns.Text()
group_topic_names = columns.Text()
group_country = columns.Text()
group_state = columns.Text()
group_city = columns.Text()
group_name = columns.Text()
group_lon = columns.Integer()
group_lat = columns.Integer()
group_id = columns.Integer()
When I run this code, I got the following errors:
Traceback (most recent call last): File "", line 1, in File "/Users/hpnhxxwn/anaconda/envs/magenta/lib/python2.7/site-packages/django/db/models/base.py", line 105, in new app_config = apps.get_containing_app_config(module) File "/Users/hpnhxxwn/anaconda/envs/magenta/lib/python2.7/site-packages/django/apps/registry.py", line 237, in get_containing_app_config self.check_apps_ready() File "/Users/hpnhxxwn/anaconda/envs/magenta/lib/python2.7/site-packages/django/apps/registry.py", line 124, in check_apps_ready raise AppRegistryNotReady("Apps aren't loaded yet.") django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
Can someone please advise how to proceed?
SECRET_KEY
in yoursettings.py
file? – nik_mdjango-admin startproject project_name
, Django automatically creates asettings.py
for you. Inside there, you should not change theSECRET_KEY
string. – nik_m