python - SQLite not recognising django table- or the other way around? -


i have researched problem lot can't seem result. trying insert new values , query tables django established table-database. seems number of people have had reoccurring problem on years. have tried rectify both on mac , on desk linux server both on django 1.8 , 1.9 problem remains after migrations...

based on advice have seen on similar posts have tried following:

      # update database establish inputs       ./manage.py        # inserting installed_apps       django.contrib.sites         # modifying settings.py below...       import os       project_path = os.path.dirname(os.path.abspath(__file__))       'name': os.path.join(project_path,'mysite.sqlite3'),        # specifying full pathname database in settings.py        'name': os.path.join(base_dir, '/project/homemsc/username/trydjango19/mysite/db.sqlite3') 

however in case of each of these modifications when inserting values in sqlite "error: no such table exists" returned. know sure subtle i'm doing when setting database....

you have create table in database. can hand (which not recommended) or create django migration using:

./manage.py makemigrations 

and apply migration using

./manage.py migrate 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -