idlesign / django-siteprefs

Reusable app for Django introducing site preferences system
https://github.com/idlesign/django-siteprefs
BSD 3-Clause "New" or "Revised" License
17 stars 6 forks source link

field parameter for PrefProxy is ignored #6

Closed KarolS closed 10 years ago

KarolS commented 10 years ago
from django.conf import settings
from django.db import models
from siteprefs.toolbox import patch_locals, register_prefs, pref, pref_group

CUSTOMER_ID = getattr(settings, 'CUSTOMER_ID', 'admin')

patch_locals()
register_prefs(
    pref(CUSTOMER_ID, verbose_name="Customer ID", 
        static=False, field=models.CharField(max_length=10))
)

Expected: according to http://django-siteprefs.readthedocs.org/en/latest/registration.html#options-accepted-by-prefs a nice, small text field to input customer's ID.

Actual: a huge textarea.

idlesign commented 10 years ago

Thank you for the report.

Seems to be fixed. Feel free to reopen as needed.

KarolS commented 10 years ago

Confirming that it works and doesn't break anything so far. Thanks.