Note that there are some explanatory texts on larger screens.

plurals
  1. PODataBase Error when running python manage.py runserver
    primarykey
    data
    text
    <p>I am working with Django 1.4.3 on PowerShell and I am getting a DataBase error after running <code>python manage.py</code> with the Exception Value: </p> <p><code>(1054, "Unknown column 'ventas_cliente.apellidos' in 'field list'")</code></p> <p>So I am following a Django tutorial and I have the following directory for a project: </p> <pre><code>demo/ demo/ apps/ ventas/ __init__.py admin.py models.py tests.py views.py __init.py __init__.py settings.py urls.py wsgi.py manage </code></pre> <p>And under admin.py I have:</p> <pre><code>from django.contrib import admin from demo.apps.ventas.models import cliente.producto # Register the ventas models admin.site.register(cliente) admin.site.register(producto) </code></pre> <p>And from models.py, </p> <pre><code>from django.db import models class cliente(models.Model): nombre = models.CharField(max_length=200) apellidos = models.CharField(max_length=200) status = models.BooleanField(default=True) class producto(models.Model): nombre = models.CharField(max_length=200) descripcion = models.TextField(max_length=300) status = models.BooleanField(default=True) </code></pre> <p>I am using MySQL and I am not changing databases. <code>runserver</code> did work and I am able to access localhost:8000/admin. There I have a new category called "ventas" which have the "cliente" and the "producto" subcategory. I can access "producto" but "cliente" gives me the DataBase error. </p> <p>What seems to be wrong? I suspect it has to do with my models.py file but I just don't know why. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload