-
Notifications
You must be signed in to change notification settings - Fork 709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suit ignores formfield_overrides #117
Comments
I don't think Suit has something to do with it, since DS is mostly just a html/css/js skin. |
I remove suit from installed apps and the formfield_overrides for the admin works fine (so it must have something to do with Suit). So then that means for every separate admin.ModelAdmin I have to define out the whole form? Can you give a specific example of how to do this roughly in the following way: class MyModelForm(ModelForm): class MyModelAdmin(ModelAdmin): class Admin1(MyModelAdmin): class Admin2(MyModelAdmin): etc... because it seems the widget way would require creating custom forms for every admin? |
Sorry for delay. Summer vacation time :) I just tested and Since you didn't show exact code, i guess you tried wrong method for "widening" inputs. Here is how to do it using class CountryAdmin(ModelAdmin):
formfield_overrides = {
models.CharField: {'widget': TextInput(attrs={'class':'span12'})},
} You can use Let me know if it works. |
Thanks! Working now... |
I have formfield_overrides set to make textinputs and text areas wider for charfields and textfields respectively. Suit appears to ignore or override this making it difficult to widen text inputs and textareas for easier editing. What is the recommended way to do this with Suit?
The text was updated successfully, but these errors were encountered: