<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: modelforms</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/modelforms.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2008-04-12T12:54:51+00:00</updated><author><name>Simon Willison</name></author><entry><title>Multiple inheritance of newforms and modelforms</title><link href="https://simonwillison.net/2008/Apr/12/django/#atom-tag" rel="alternate"/><published>2008-04-12T12:54:51+00:00</published><updated>2008-04-12T12:54:51+00:00</updated><id>https://simonwillison.net/2008/Apr/12/django/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.djangosnippets.org/snippets/703/"&gt;Multiple inheritance of newforms and modelforms&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
If you ever see “Error when calling the metaclass bases metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases” when trying multiple inheritance with newforms and modelforms, here’s a scary solution I found.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/inheritance"&gt;inheritance&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/metaclasses"&gt;metaclasses&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/modelforms"&gt;modelforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/multipleinheritance"&gt;multipleinheritance&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/newforms"&gt;newforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="django"/><category term="inheritance"/><category term="metaclasses"/><category term="modelforms"/><category term="multipleinheritance"/><category term="newforms"/><category term="python"/></entry><entry><title>Quoting Google App Engine docs</title><link href="https://simonwillison.net/2008/Apr/8/forms/#atom-tag" rel="alternate"/><published>2008-04-08T13:48:18+00:00</published><updated>2008-04-08T13:48:18+00:00</updated><id>https://simonwillison.net/2008/Apr/8/forms/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://code.google.com/appengine/articles/djangoforms.html"&gt;&lt;p&gt;The Google App Engine model class, db.Model, is not the same as the model class used by Django. As a result, you cannot directly use the Django forms framework with Google App Engine. However, Google App Engine includes a module, db.djangoforms, which casts between the datastore models used with Google App Engine and the Django models specification. In most cases, you can use db.djangoforms.ModelForm in the same manner as the Django framework.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://code.google.com/appengine/articles/djangoforms.html"&gt;Google App Engine docs&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google"&gt;google&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google-app-engine"&gt;google-app-engine&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/modelforms"&gt;modelforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/newforms"&gt;newforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="django"/><category term="google"/><category term="google-app-engine"/><category term="modelforms"/><category term="newforms"/><category term="python"/></entry></feed>