Hi, I am doing a djangogirls tutorial and ran into OperationalError without such a table: blog_post. This works fine on my virtual environment, but I get an OperationalError after clicking on the hero.
I am using Django 1.7.7. More information about the error can be found at: https://girlsblog.herokuapp.com/
I did python manage.py makemigrations python manage.py migrate initially at the beginning of the tutorial. Then I tried to do it again, and there are "No changes" and "No migration to do"
This is my post_list.html
{% extends 'blog/base.html' %} {% block content %} {% for post in posts %} <div class="post"> <div class="date"> {{ post.published.date }} </div> <h1><a href="{% url 'blog.views.post_detail' pk=post.pk %}">{{ post.title }}</a></h1> <p> {{ post.text|linebreaks }}</p> </div> {% endfor %} {% endblock content %}
This is my .gitignore
myvenv __pycache__ staticfiles local_settings.py db.sqlite3
Models.py
from django.db import models from django.utils import timezone
Settings.py
""" Django settings for mysite project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """
Blog / views.py
from django.shortcuts import render, get_object_or_404 from django.utils import timezone from .models import Post from .forms import PostForm
I'm really new to this, so please forgive the βsimpleβ mistakes.
source share