How to render formset in template django and create vertical table?

2013-07-05 Thread MacVictor
How to create this table used formset and extra=3? Table: | my name first column | second column | third column | fourth column | | formset1.field1.label | formset1.field1 | formset2.field1 | formset3.field1 | | formset1.field2.label | formset1.field2 | formset2.field2 | formset3.field2 | |

Re: Get Form from string?

2013-06-30 Thread MacVictor
/window.html', response) W dniu piątek, 28 czerwca 2013 22:09:41 UTC+2 użytkownik MacVictor napisał: > > get the model by string i use: > > from django.db.models.loading import get_model > def get_model(self, app_label, model_name, seed_cache=True): > > how to get ModelForm

Re: Get Form from string?

2013-06-30 Thread MacVictor
aid, I did not understand your question. Are you trying to > generate a form based on your model/ models? > > On Friday, June 28, 2013 3:23:00 PM UTC-5, MacVictor wrote: >> >> and how to get only Form (not ModelForm) use string name? >> >> W dniu piątek, 28 czerwca 2

Re: Get Form from string?

2013-06-28 Thread MacVictor
and how to get only Form (not ModelForm) use string name? W dniu piątek, 28 czerwca 2013 22:09:41 UTC+2 użytkownik MacVictor napisał: > > get the model by string i use: > > from django.db.models.loading import get_model > def get_model(self, app_label, model_name, seed_cache

Get Form from string?

2013-06-28 Thread MacVictor
get the model by string i use: from django.db.models.loading import get_model def get_model(self, app_label, model_name, seed_cache=True): how to get ModelForm by string? i try used: modelforms = forms.ModelForm.__subclasses__() def get_form(form): try: for model_form in

How create custom template tags and use Forms?

2013-06-28 Thread MacVictor
I create custom django template and used Form (this tag has to be universal): This is file ratings.py use tags: from django import template from django.contrib.contenttypes.models import ContentType from Ratings.forms import RatingsForm register = template.Library() class