How to set the size for Inline Dropdown lists

2010-04-18 Thread Asim Yuksel
Hi I have an inline model. It lists the foreign keys in a dropdown list. It adjusts its size according to the largest text in it. How can I have a small dropdown list? It is too big. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Re: Please help me make a SELECT box!

2010-04-19 Thread Asim Yuksel
Why dont you use a widget with charfield forms.CharField(max_length=1, widget=forms.Select (choices=CHOICES)) and your choices are CHOICE = ( ('A', 'A'), ('B', 'B'), ('C', 'C'), ) On Apr 19, 4:56 pm, amyhalf wrote: > For the life of me

Here is a tutorial for adding a plus sign for custom dropdown box in custom admin pages

2010-04-19 Thread Asim Yuksel
If you registered your models with adminCreate a widgets.py and put the following code there from django.template.loader import render_to_string from ivl.views import * def SelectWidgetWithPopUp(url): class SelectWithPopUp(forms.Select): def render(self, name, *args, **kwargs):

ForeignKeyField

2010-03-25 Thread Asim Yuksel
I have a question about model.ForeignKey field.Foreign key fields are shown as object in admin page. How can I show them in other types like integer type for example I have a Model like this: class Advisor(models.Model): advisorid = models.IntegerField(primary_key=True, db_column='advisorId')

Re: ForeignKeyField

2010-03-25 Thread Asim Yuksel
I cant show the foreignkey values in a list_display. I tried raw_id_fields but didnt work On 25 Mart, 23:18, Shawn Milochik wrote: > This should help: > > http://docs.djangoproject.com/en/1.1/ref/contrib/admin/#raw-id-fields > > Shawn -- You received this message because you are subscribed to t

Re: ForeignKeyField

2010-03-26 Thread Asim Yuksel
Yes foreignkey is an object but there must be a way to display the value in a list_display. I am a newbie too. self.maphdid.id doesnt work On 26 Mart, 06:05, Thierry Chich wrote: > Le vendredi 26 mars 2010 04:14:51, Asim Yuksel a écrit : > > > I have a question about mode

Re: ForeignKeyField

2010-03-26 Thread Asim Yuksel
, it says it deosnt exist On 26 Mart, 13:11, Daniel Roseman wrote: > On Mar 26, 4:44 pm, Asim Yuksel wrote: > > > Yes foreignkey is an object but there must be a way to display the > > value in a list_display. I am a newbie too. self.maphdid.id doesnt > > work > > The

Re: ForeignKeyField

2010-03-26 Thread Asim Yuksel
f in model._meta.fields] return BrdgadvisorsAdmin admin.site.register(Brdgadvisors,AdvisorAdmin(Brdgadvisors)) So this doesnt work. On 26 Mart, 19:10, Karen Tracey wrote: > On Fri, Mar 26, 2010 at 4:31 PM, Asim Yuksel wrote: > > > here is the list display > > >http://picasa

Re: ForeignKeyField

2010-03-26 Thread Asim Yuksel
You know what I am trying to solve this for about 2 days. Thank you so much it worked :) All my respects to your brain :) On 26 Mart, 20:04, Karen Tracey wrote: > On Fri, Mar 26, 2010 at 8:00 PM, Asim Yuksel wrote: > > > I've tried this. > > The model is > >

Displaying the fields of two tables on the same admin page

2010-03-28 Thread Asim Yuksel
I have two questions. 1)I have two tables(People, Publication) and they are not related and I want to display the fields of these tables on the same admin page. So when I fill all the fields, I want to insert these values into people and publication tables. 2) I also want to insert the id values of

Re: Displaying the fields of two tables on the same admin page

2010-03-28 Thread Asim Yuksel
art, 15:37, Gramware wrote: > On Mar 28, 8:40 pm, Asim Yuksel wrote: > > > I have two questions. > > 1)I have two tables(People, Publication) and they are not related and > > I want to display the fields of these tables on the same admin page. > > So when I fill all the fi

How to customize admin's save button functionality?

2010-03-28 Thread Asim Yuksel
How can I edit admin's save button, so whenever I click save, I can be redirected to a page after successfully inserting the values into db? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@google

Re: Displaying the fields of two tables on the same admin page

2010-03-29 Thread Asim Yuksel
I am entering them on the same page otherwise I will have to note down the ids of people and publications table and then go to bridge table and insert the ids there. So the reason I want to enter in the same page is I will insert the ids into bridge table whenever I click save. I am not allowed to

Admin Add Page

2010-03-30 Thread Asim Yuksel
I want to use a custom admin add page with custom admin look and feel. What is the template to extend? I want to use something like this http://picasaweb.google.com/110428031719333287170/BaslKsZAlbum#5454485792741726834 I tried to hack the html by viewing the source but it is time consuming and i

Re: Admin Add Page

2010-03-31 Thread Asim Yuksel
or the base_site.html template. > > Look in your: django/contrib/admin/templates/admin/ folder to see all > of the templates. Also, check out the documentation > at:http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-vs... > > Cheers, > Brandon > > On Mar 30, 1:1

How to display other field(not the foreign key) in admin dropdown list

2010-03-31 Thread Asim Yuksel
I have a people table and a bridge table which are related. bridge table has a foreignkey field for people table. When I click add from django admin it shows the peopleid in a drop down list. What I want to do is I want to show the people.name field instead of peopleid foreignkey field? How can I

Re: Displaying the fields of two tables on the same admin page

2010-03-31 Thread Asim Yuksel
The people and publication are not related so I cant use manytomany On 31 Mart, 15:30, "Giovannetti, Mark" wrote: > > I am entering them on the same page otherwise I will have to note down > > the ids of people and publications table and then go to bridge table > > and insert the ids there. So th

Re: How to display other field(not the foreign key) in admin dropdown list

2010-03-31 Thread Asim Yuksel
Okey I want to answer this :) just add a unicode method to your model something like this def __unicode__(self): return "%s" % self.name On 31 Mart, 16:37, Asim Yuksel wrote: > I have a people table and a bridge table which are related. bridge > table has a foreignkey

2 Views In One Admin Template

2010-04-02 Thread Asim Yuksel
How can show two different views in one admin view(change_form.html)? I have a custom change_form.html for a model view. In that model's view, I want to include another view I tried the following but it shows same view again {% for fieldset in adminform %} {% include "admin/includes/Brdgauthors

ModelMultipleChoiceField and plus sign

2010-04-07 Thread Asim Yuksel
I have a field called peopleid. The default admin page displays this as a dropdown list and shows a green plus sign near it. Instead of dropdown, I want to use MultipleChoiceField. But if I define this field. I dont see the plus sign? How can I make it appear near the ModelMultipleChoiceField? Her

Dynamic Inline fileds

2010-04-08 Thread Asim Yuksel
How can I add dynamic inline fields? I want to use the extra=1 and I want to have a plus sign which will add more dynamic fields so the extra field will increase -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Re: Dynamic Inline fileds

2010-04-08 Thread Asim Yuksel
media/js/jquery-1.4.2.js', '/media/js/dynamic_inlines_with_sort.js',] css = { 'all' : ['/media/css/dynamic_inlines_with_sort.css'],} You will see a plus sign or add new row text below. I was able to duplicate text fields,dropdown lists s