Hi there,
you are telling django, you know what you are doing via
managed = False -> no batteries included, please read the details here
https://docs.djangoproject.com/en/dev/ref/models/options/
There are great books out there explaining django from
other perspectives than the online documentation
Two Scoops of Django
http://www.amazon.com/Two-Scoops-Django-Best-Practices/dp/098146730X/
Test driven development in python
http://www.amazon.com/Test-Driven-Development-Python-Harry-Percival/dp/1449364829/
Hope this helps
Frank
Am 16.07.14 19:08, schrieb G Z:
so I added a db trigger in oracle and it still said the same thing
when ever I tried to save the new addition. Also whenever I try to go
to an existing vm the manytomany field throws an exception that table
or view doesn't exist but when I goto add new it doesnt and the
correct field is displayed, but then when i save it says can't be null.
What changes from what you can see could I make to curb these problems?
class License(models.Model):
license_id = models.AutoField(primary_key = True, editable = False,
db_column='license_id')
license_authority_id = models.ForeignKey(License_authoritie,
on_delete = models.PROTECT, db_column='license_authority_id')
product = models.CharField(max_length = 20)
class Meta:
managed = False
db_table = 'licenses'
ordering = ['product']
def __unicode__(self): # Python 3: def __str__(self):
return self.product
class Vm_license(models.Model):
vm_license_id = models.AutoField(primary_key = True,
db_column='vm_license_id')
vm_id = models.ForeignKey(Vm, on_delete = models.PROTECT,
db_column='vm_id')
license = models.ManyToManyField(
License)
class Meta:
managed = False
db_table = 'vm_licenses'
class vm_license_admin(admin.ModelAdmin):
#list_display = ('vm_id', 'license_id')
list_display = ('vm_id',)
search_fields = ('vm_id__vm_name',)
ordering = ('vm_id',)
filter_horizontal = ('license',)
admin.site.register(Vm_license, vm_license_admin)
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/9ecf5d7f-c303-4742-9ad7-a1a56bddb716%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/9ecf5d7f-c303-4742-9ad7-a1a56bddb716%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/53C6C42B.6050505%40produktlaunch.de.
For more options, visit https://groups.google.com/d/optout.