Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting error when running the Django server on my Mac 10.8.5
    primarykey
    data
    text
    <p>I am trying to setup Python/Django/Mysql on my Mac but I keep getting the following error when I run this command in terminal </p> <pre><code>Python manage.py runserver </code></pre> <p>The error I get is </p> <pre><code>Marks-MacBook-Air:FirstBlog mmillar$ python manage.py runserver Validating models... Unhandled exception in thread started by &lt;bound method Command.inner_run of &lt;django.contrib.staticfiles.management.commands.runserver.Command object at 0x1017c2b10&gt;&gt; Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 92, in inner_run self.validate(display_num_errors=True) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 280, in validate num_errors = get_validation_errors(s, app) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/validation.py", line 35, in get_validation_errors for (app_name, error) in get_app_errors().items(): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/loading.py", line 166, in get_app_errors self._populate() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/loading.py", line 72, in _populate self.load_app(app_name, True) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/loading.py", line 96, in load_app models = import_module('.models', app_name) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/Users/mmillar/PycharmProjects/FirstBlog/blog/models.py", line 5, in &lt;module&gt; class post(models.Model): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", line 145, in __new__ new_class.add_to_class(obj_name, obj) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", line 265, in add_to_class value.contribute_to_class(cls, name) TypeError: Error when calling the metaclass bases unbound method contribute_to_class() must be called with TextField instance as first argument (got ModelBase instance instead) </code></pre> <hr> <p><strong>models.py</strong></p> <pre><code>from django.db import models # Create your models here. class post(models.Model): author = models.CharField(max_length=30) title = models.CharField(max_length=100) bodytext = models.TextField timestamp = models.DateTimeField </code></pre>
    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