Re: Implement form.as_table, as_ul, as_p using templates

2017-02-03 Thread Gert Steyn
Hi Tim The implementation can be extremely simple as most of the heavy lifting has already been done for widget templates. The only new parts are: 1. BaseForm.get_context 2. The templates to implement as_table, as_ul and as_p 3. A little bit of glue (render etc, pretty much the same as

Implement form.as_table, as_ul, as_p using templates

2017-02-03 Thread Gert Steyn
Hi All Is anybody against using the new renderers (used to render widgets) to also render the form? I suggest something like: class BaseForm(object): template_prefix = '' template_name = 'django/forms/form_as_table.html' def render(self, template_name=None): template_name =

Re: Template sets for widgets

2017-02-01 Thread Gert Steyn
I think something as simple as {% form your_form prefix='bootstrap' %} and {% field your_field prefix='bootstrap' %} would add huge flexibility, exactly the concept I was trying to convey! -- You received this message because you are subscribed to the Google Groups "Django developers (Contr

Re: Template sets for widgets

2017-02-01 Thread Gert Steyn
Hi Tim I did, and I agree that a TemplatesSetting renderer of sorts would most likely be the way to implement. I also think that the use case of "*Using some CSS framework*" is common enough to warrant giving developers a clean/standard way of doing this rather than letting each roll their own

Template sets for widgets

2017-02-01 Thread Gert Steyn
d easy to implement any framework of your choosing or switch from one framework to another... Your thoughts on 1) concept and 2) implementation? Regards Gert Steyn -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django it

Re: Dynamic inlines for Django ModelAdmin

2015-07-27 Thread Gert Steyn
> > While the request per se makes sense I have the feeling that the admin is > becoming a dumping ground for every possible method out there :/ > We have six views squeezed into a single class, making it customizable will inevitably require a large number of methods. My prediction is that it

Re: Dynamic inlines for Django ModelAdmin

2015-07-27 Thread Gert Steyn
Duplicating an entire method from core is the easy part, remembering to check that against the new Django code every time there is a new Django release is the actual problem. Gert > > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributi

Dynamic inlines for Django ModelAdmin

2015-07-26 Thread Gert Steyn
Hi All I've been using Django since before newforms-admin and have seen ModelAdmin gradually becoming more customization. I often use dynamic inlines (based on the state of the object) and would like to clean up the implementation a bit. I would like to open a ticket to add: def get_inlines(s

FormSetView and ModelFormSetView

2013-09-19 Thread Gert Steyn
of this available, all of them are slightly different and none of them seem to stand out as an obvious choice. Most Django developers don't have the same skills as the core developers, please provide your guidance with this. Regards Gert Steyn -- You received this message because yo