Customising widget widths in django-admin (using django-grappelli)

2015-04-22 Thread Vikas Rawal
I have an admin form that is rather long (many models, over 150 fields). I use TabularInlines for most of these. I am unable to adjust width of various fields to reduce the overall width of the form. Since django-grappelli overrides widths specified in forms.py, the recommended way is to us

Re: Form field with suggestions rather than binding choices

2012-09-10 Thread Vikas Rawal
> > > Will be grateful for advice on which is the most straight forward and > functional solution. > > or link to a clear howto on doing autocomplete. vikas -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web

Re: Form field with suggestions rather than binding choices

2012-09-09 Thread Vikas Rawal
> > > I think you should use a properly modified autocomplete solution. > https://code.djangoproject.com/wiki/AutoCompleteSolutions > Could you suggest what is the easiest of them to implement. I have been trying autocomplete_light but the documentation is not very clear. It assumes the user

autocomplete_light

2012-09-06 Thread Vikas Rawal
I am trying to use autocomplete_light on an admin form. I find the documentation extremely confusing. The google group for autocomplete_light seems defunct (my request for subscription has not been answered for two days). Does someone here use it? The format of registry is not clear to me. I wo

Re: Form field with suggestions rather than binding choices

2012-09-04 Thread Vikas Rawal
> > > I want to have a field in which the drop-down menu lists some > > suggestions that the user may choose from, or if nothing suits, the > > user may enter something other than what is available on the menu. > > I think you should use a properly modified autocomplete solution. > https://cod

Form field with suggestions rather than binding choices

2012-08-29 Thread Vikas Rawal
I want to have a field in which the drop-down menu lists some suggestions that the user may choose from, or if nothing suits, the user may enter something other than what is available on the menu. In other words, I want the menu to give suggestions rather than choices that are validated against va

Re: Column widths in TabularInline

2012-08-29 Thread Vikas Rawal
> How do i customise width of different columns in a TabularInline object in my > admin interface. For record, I finally managed to resize form fields using instructions given here: http://blogs.law.harvard.edu/rprasad/2011/08/31/django-admin-resizing-form-fields-for-tabularinline/ Thanks very

Re: Column widths in TabularInline

2012-08-28 Thread Vikas Rawal
> The problem I am posting it to django list is because the problem is > obviously related to the way django works. Various solutions to the > problem, none of which have worked so far, have either been using > python/django or css (and now, jquery). > > > > you can not expect t

Re: Column widths in TabularInline

2012-08-27 Thread Vikas Rawal
> > The problem is that the #id is different for each row of the tabular > inline object. > > it takes the form > > id="id_member_set-0-name" for the first row, id="id_member_set-1-name" > for the second row, etc. > > Therefore #whatever does not work. Is there a way of

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: 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

Re: Column widths in TabularInline

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

Re: Column widths in TabularInline

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

Column widths in TabularInline

2012-08-24 Thread Vikas Rawal
How do i customise width of different columns in a TabularInline object in my admin interface. V. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/dekCUaST

Re: Layout of widgets in admin form

2012-08-24 Thread Vikas Rawal
Thanks. Worked perfectly. Vikas On Friday, August 24, 2012 6:32:03 PM UTC+5:30, Melvyn Sopacua wrote: > > On 24-8-2012 14:05, Vikas Rawal wrote: > >> > >> < > https://docs.djangoproject.com/en/1.4/intro/tutorial02/#customize-the-admin-form> >

Re: Layout of widgets in admin form

2012-08-24 Thread Vikas Rawal
> > > > See the fieldsets part. The examples shown for fieldsets seem to divide the fields into different groups. But in all the examples, fields still appear, within each group, one after another, vertically. V

Layout of widgets in admin form

2012-08-24 Thread Vikas Rawal
I am new to django. I am trying to develop an application where I need to work with the admin interface. The usual admin interface (for example in the poll app of django tutorial) lays out the widgets vertically. How do I change that? If I want to put two or three widgets side by side, customise

Re: Foreignkeys on multiple fields

2012-05-20 Thread Vikas Rawal
>> >Forget Django for the moment, and study "database normalization". > >Then consider that Django, so far as I know, adds a primary key > field to each table (model). The main purpose of integer primary key > fields IS to be used as the target of foreign key lookups. I understand this

Re: Foreignkeys on multiple fields

2012-05-20 Thread Vikas Rawal
> But your model structure doesn't seem to make sense. Why have two ForeignKeys > From Members to Intro? That means that a member could point to different > entries for village and household number, which can't be right. The usual > thing to do is to have a single FK, and access eg member.intr

Foreignkeys on multiple fields

2012-05-20 Thread Vikas Rawal
I am new to django, and am trying to build a data-based app. The models are as follows. class Intro(models.Model) Village = models.CharField(max_length=150) HouseholdNumber = models.IntegerField() Address = models.CharField(max_length=150) unique_together = ('Village','HouseholdNumber') class

Re: Editable datagrid

2011-11-21 Thread Vikas Rawal
> I would look at Sencha. Does not seem open-source. Is it? Vikas -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-user

Re: Editable datagrid

2011-11-21 Thread Vikas Rawal
> I would look at Sencha. They seem to have a nice clean grid > control. It uses > a RESTful interface for importing / exporting data from local data > models via > an AJAX proxy. You use JSON to ship data back and forth. I'd > think you could > use something like django-piston to expose your

Editable datagrid

2011-11-21 Thread Vikas Rawal
I am new to django and to web programming. I am trying to build a database application for entering/querying/viewing data from a mysql database. The data entry module needs to have datagrids where users can enter multiple rows of data belonging to a particular set. Would be grateful for pointers t