Re: Django ManytoMany Relationships

2014-07-15 Thread G Z
Admin.py class vm_license_admin(admin.ModelAdmin): list_display = ('vm',) search_fields = ('vm__vm_name',) ordering = ('vm',) filter_horizontal = ('license',) admin.site.register(Vm_license, vm_license_admin) class License(models.Model): license_id = models.BigIntegerFie

Re: Django ManytoMany Relationships

2014-07-15 Thread G Z
Kirby, This is what i have so far but i dont understand how to get the table to do what I want. Because all I get on vm_licenses is the ability to select the vm there is no licenses anymore. I'm not quite sure how all of this works together. class License(models.Model): license_id = models

Re: Django ManytoMany Relationships

2014-07-15 Thread C. Kirby
ManyToMany fields actually create a new intermediary join table in the database. If you are using an unmanaged database then you will need to create the intermediary table yourself. See the ManyToMany field reference On

Django ManytoMany Relationships

2014-07-15 Thread G Z
I will start by saying I have an existing database, for the purpose of my question it has three tables: Vm Vm_licenses Licenses This database is per-existing before we decided to make a django web-portal. Basically licenses is a da