Re: Column widths in TabularInline

2012-08-26 Thread Vikas Rawal
> > In admin.py you can for example ... > > > > fieldsets = ( > > (None, { > > 'classes': ['myowncssclassname',], > > 'fields': ( > > 'field_abc', > > 'field_xyz', > > > > ... and specify myowncssclassname in myextrasty

ModelMultipleChoiceField with MultiWidget ?

2012-08-26 Thread Nicolas Emiliani
Hi, I've been struggling with this for the past two weeks, and i think it's time to ask. I have and admin form that has a ModelMultipleChoiceField that is used to display a ManyToMany model field that specifies a through model class Person(models.Model): name = models.CharField(max_length=10

Re: ModelMultipleChoiceField with MultiWidget ?

2012-08-26 Thread Joseph Mutumi
Disclaimer - I have never done this before! >From what I see I reckon you will need to create both a custom field and a custom widget! I think so because if you have TextInputs validation may fail on the ModelMultipleChoiceField? I would think you need to override the methods: __init__, clean, to

Dependent Ajax Form Fields

2012-08-26 Thread Joseph Mutumi
Hello, If A is a model with ForeignKey relationships to B. What would be the best way of rendering two selectboxes, A and B. The values of B are the values filtered through using the relationship with the selected value of A via an AJAX call. I need to get these values from the DB as well as have

expand fieldset by choice

2012-08-26 Thread Axel Rau
In my admin site, I have a fieldset which depends on a choice. I would like to control expansion of the related fieldset by the choice instead of the standard widgets. How can I do this? Axel --- PGP-Key:29E99DD6 ☀ +49 151 2300 9283 ☀ computing @ chaos claudius -- You received this message be

Ecommerce Solution

2012-08-26 Thread Swaroop Shankar V
Hi All, Previously I had asked similar question on this group and decided to go with Satchmo. After the implementation it turned out to be bit difficult to maintain since the system do not provide much plugin or customization support. So am thinking of implementing another ecommerce solution. The s

Re: Ecommerce Solution

2012-08-26 Thread Alec Taylor
Mezzanine? On Mon, Aug 27, 2012 at 6:03 AM, Swaroop Shankar V wrote: > Hi All, > Previously I had asked similar question on this group and decided to go with > Satchmo. After the implementation it turned out to be bit difficult to > maintain since the system do not provide much plugin or customiz

Re: Column widths in TabularInline

2012-08-26 Thread Mike Dewhirst
On 26/08/2012 6:22pm, Vikas Rawal wrote: > In admin.py you can for example ... > > fieldsets = ( > (None, { > 'classes': ['myowncssclassname',], > 'fields': ( > 'field_abc', > 'field_xyz

Re: ModelMultipleChoiceField with MultiWidget ?

2012-08-26 Thread Nicolas Emiliani
Finally, I'm starting to see some light and it is almost working. >From what I see I reckon you will need to create both a custom field and a > custom widget! > > I think so because if you have TextInputs validation may fail on the > ModelMultipleChoiceField? > Yes, they do, because it checks th

Re: expand fieldset by choice

2012-08-26 Thread Nicolas Emiliani
On Sun, Aug 26, 2012 at 5:03 PM, Axel Rau wrote: > In my admin site, I have a fieldset which depends on a choice. > I would like to control expansion of the related fieldset by the choice > instead of the standard widgets. > How can I do this? > I don't understand clearly what you want, but, cor

widget construction issue

2012-08-26 Thread Nicolas Emiliani
Hi, I built a widget class that inherits form MultiWidget and it looks like this : class GridWidget(forms.MultiWidget): def __init__(self, attrs=None, queryset=None): self.queryset = queryset _widgets = [] for record in self.queryset: . do stuf

Re: New to Django, having difficulty creating first app. PLEASE HELP!

2012-08-26 Thread lukedc
Thank you Matt, that answered my question!. Thank you so much, it was very nice of you. On Friday, August 24, 2012 6:36:33 PM UTC-5, MattDale wrote: > > Glad you are trying out Django. > > That error is telling you what's wrong The directory that you are in does > not include the file "manage.

how to “break” from a regex in urlconf

2012-08-26 Thread Matthew Meyer
I have the following views: def tag_page(request, tag): products = Product.objects.filter(tag=tag) return render(request, 'shop/tag_page.html', {'products': products, 'tag': tag}) def product_page(request, slug): product = Product.objects.get(slug=slug) return render(reque

Re: After form validation, need to post and call a perl program to display to a log file

2012-08-26 Thread Pervez Mulla
Hey Nick, Thank you for mail, Can I make use CGI script for this...? If yes how can I make use of that..? Hint>>!!\ Thank you pervez On Fri, Aug 24, 2012 at 8:30 PM, Nick Santos wrote: > Obligatory followup (though the docs I believe cover this pretty well) - > be *very* careful

Re: Dependent Ajax Form Fields

2012-08-26 Thread Jani Tiainen
26.8.2012 21:54, Joseph Mutumi kirjoitti: Hello, If A is a model with ForeignKey relationships to B. What would be the best way of rendering two selectboxes, A and B. The values of B are the values filtered through using the relationship with the selected value of A via an AJAX call. I need to

Re: Column widths in TabularInline

2012-08-26 Thread Vikas Rawal
> >There is a field in my model called "name". What do I give in the css > >file to reduce its width to say 100px? > > This is css rather than Django but this is what I did to make my > input field wider ... > > .wider .vTextField { > width: 60em !important; > } > > If you view source in you

Re: widget construction issue

2012-08-26 Thread Melvyn Sopacua
On 27-8-2012 1:21, Nicolas Emiliani wrote: > The thing is that the GridWidget.__init__ method does not get executed > each time I access the form that contains it, so if the queryset changes the > widget gets 'obsolete'. That's because the widget is merely the piece that get rendered. It's driven