HI Tyler, I'm glad the admin interface has been useful to you.
Right now, based on the way the pre-built admin javascript works, you have the ability to delete all the multipolygons (see the `delete features`) link which should appear below each OL map in the admin, and you should have an OL modify feature control available to delete vertices (and it sounds like you've experimented with this). It is standard behavior to only be able to delete vertices until you have 3 remaining. To be able to delete individual multipolygons, a special editing control will need to be added to delete any selected polygons. This is a fairly easy thing to do in the OL library and to do this in your Django admin app you can either override the admin js by pointing to your own templates and js in the `TargetAdmin` class or you can file a feature request ticket to have this added django.contrib.gis. Dane On Sep 7, 5:11 am, Tyler Erickson <[EMAIL PROTECTED]> wrote: > I've been experimenting with the admin interface for a > MultiPolygonField in Django 1.0. (A very useful bit of > functionality!) The OpenLayers map interface loads up correctly, and > I can add and edit multiple polygons, but I can't seem to delete any > of the individual polygons. (The best I can seem to do is delete > vertices of a polygon until I only have 3 vertices left.) > > Is there are a way to remove individual polygons from a > MultiPolygonField using the OpenLayers interface? > > - Tyler > > Here are some snippets of the relevant code... > > from django.contrib.gis.db import models > class Target(models.Model): > name = models.CharField(max_length=30) > description = models.CharField(max_length=255) > poly = models.MultiPolygonField() > objects = models.GeoManager() > > from django.contrib.gis import admin > class TargetAdmin(admin.GeoModelAdmin): > list_display = ['name'] > search_fields = ['name'] > > admin.site.register(Target, TargetAdmin) --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---