djangosnippets.org: Latest snippets tagged with 'frame'https://djangosnippets.org/tags/frame/2011-02-20T04:20:33.553936-06:00Custom model field for Frame or Box
2011-02-20T04:20:33.553936-06:00binishkasparhttps://djangosnippets.org/snippets/2364/<p><strong>Purpose</strong></p>
<p>We often need to store x,y, width and height for a model, we can store all these values in same field by having custom field. </p>
<p><strong>How to Use</strong></p>
<p>Save this code in <em>customfields.py</em> and in your model</p>
<blockquote>
<p><em>from customfields import FrameField</em>
<em>class MyModel(models,Model)</em>
<em> frame = FrameField()</em></p>
</blockquote>
<p>And in your …</p>
Freely redistributable