djangosnippets.org: Latest snippets tagged with 'pyodbc'https://djangosnippets.org/tags/pyodbc/2008-10-30T11:25:27.670660-05:00django-pyodbc MoneyField
2008-10-30T11:25:27.670660-05:00Tarkenhttps://djangosnippets.org/snippets/1161/<p>This is a very small, simple piece of code, but essential for using fields of type 'money' on MS SQL Server, through FreeTDS. This took me quite some time to hunt down, as get_placeholder() is in fact an undocumented feature.</p>
<p><strong>Example:</strong></p>
<pre><code>class MyModel(models.Model):
price = MoneyField()
</code></pre>
Freely redistributable