Skip to content
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

Widget resizing not working in change list #121

Closed
gamesbook opened this issue Jun 25, 2013 · 2 comments
Closed

Widget resizing not working in change list #121

gamesbook opened this issue Jun 25, 2013 · 2 comments

Comments

@gamesbook
Copy link

The Django admin allows for widgets for editable items in the change list to be overridden. https://docs.djangoproject.com/en/1.4/ref/contrib/admin/#django.contrib.admin.ModelAdmin.formfield_overrides

Doing this:

formfield_overrides = {
        models.PositiveSmallIntegerField: {'widget': forms.TextInput(attrs={'size': '5'})},
}

works for the normal admin but not in suit. i.e. changing the size between 5 and 15 makes no difference.

normal_5

normal_15

suit_5

suit_15

@darklow
Copy link
Owner

darklow commented Jun 25, 2013

size is an HTML attribute, since DjangoSuit uses Twitter Bootstrap it adds its own default width using CSS, and CSS style: width is more powerful rule than size attribute. Use class="span5" (sizes from 1-12) attribute instead.
For more examples see this issue: #117

@darklow darklow closed this as completed Jun 25, 2013
@gamesbook
Copy link
Author

Thanks! Working now... (I have left the size in, but added class as well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants