Error When Calling The Metaclass Bases Django
Contents |
here for a quick overview of the site Help Center Detailed django 1.6 metaclass answers to any questions you might have Meta Discuss the
Django Cms Metaclass Conflict
workings and policies of this site About Us Learn more about Stack Overflow the company error when calling the metaclass bases takes at most 2 arguments Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the
Error When Calling The Metaclass Bases Function() Argument 1 Must Be Code Not Str
Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Django: Error when calling the metaclass bases up vote 6 down vote favorite Here is the error TypeError: Error when calling the error when calling the metaclass bases module.__init__() takes at most 2 arguments metaclass bases metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases The class in question within my models.py class Business(models.Model, forms.Form): name = models.CharField(max_length=128) tel_no = models.CharField(max_length=11) address_ln1 = models.CharField(max_length=128) address_ln2 = models.CharField(max_length=128) city = models.CharField(max_length=64) county = GBCountySelect() postcode = GBPostcodeField() website = models.URLField(max_length=128) # Logging Info slug = models.SlugField() date_added = models.DateField(auto_now_add=True) time_added = models.TimeField() added_by_user = models.CharField(max_length=64) last_edit_time = models.TimeField(auto_now=True) last_edit_date = models.DateField(auto_now=True) The line I am getting the error on: name = models.CharField(max_length=128) But I (think) it means this one: class Business(models.Model, forms.Form): I'm not sure what it means exactly, how can I inherit my models from models.Model and forms.Form within the same class? Can I not pass two values when creating my class? If so how? ANOTHER EDIT All my imports from django.db import models from django import forms from
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack
Error When Calling The Metaclass Bases Python
Overflow the company Business Learn more about hiring developers or posting ads with us
Error When Calling The Metaclass Bases Module.__init__() Takes At Most 2 Arguments (3 Given)
Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a error when calling the metaclass bases cannot create a consistent method resolution community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error when calling the metaclass bases: function() argument 1 must be code, not str up vote http://stackoverflow.com/questions/11657532/django-error-when-calling-the-metaclass-bases 29 down vote favorite 1 I tried to subclass threading.Condition earlier today but it didn't work out. Here is the output of the Python interpreter when I try to subclass the threading.Condition class: >>> import threading >>> class ThisWontWork(threading.Condition): ... pass ... Traceback (most recent call last): File "
Sign in Pricing Blog Support Search GitHub This repository Watch https://github.com/divio/django-cms/issues/2114 312 Star 4,459 Fork 1,687 divio/django-cms Code Issues 168 Pull requests 10 Projects 0 Pulse Graphs New issue metaclass conflict with Django 1.6 (latest django-cms develop branch) #2114 Closed stefanocrosta opened this Issue Jul 31, 2013 · 25 comments Projects None yet Labels None error when yet Milestone No milestone Assignees No one assigned 9 participants stefanocrosta commented Jul 31, 2013 I admit I tried to to do something with this but it's far too advanced python for me, due to the dynamic metaclass inheritance... I'm also not sure if error when calling Django is to blame, or django-cms... File "/home/stefano/django/django/utils/autoreload.py", line 93, in wrapper fn(*args, **kwargs) File "/home/stefano/django/django/core/management/commands/runserver.py", line 97, in inner_run self.validate(display_num_errors=True) File "/home/stefano/django/django/core/management/base.py", line 308, in validate num_errors = get_validation_errors(s, app) File "/home/stefano/django/django/core/management/validation.py", line 34, in get_validation_errors for (app_name, error) in get_app_errors().items(): File "/home/stefano/django/django/db/models/loading.py", line 196, in get_app_errors self._populate() File "/home/stefano/django/django/db/models/loading.py", line 75, in _populate self.load_app(app_name, True) File "/home/stefano/django/django/db/models/loading.py", line 99, in load_app models = import_module('.models', app_name) File "/home/stefano/django/django/utils/importlib.py", line 35, in import_module __import__(name) File "/home/stefano/django-cms/cms/stacks/models.py", line 7, in