I think a possible solution is to use : http://django-floppyforms.readthedocs.org/en/latest/geodjango.html
the solution given in http://stackoverflow.com/questions/559431/how-to-display-data-using-openlayers-with-openstreetmap-in-geodjango didn't work for me there was a problem with this instruction PolygonFormField=GeneratePolygon._meta.get_field('Polygon') it didn't found the GeneratePolygon object On Apr 18, 3:13 pm, GARRAM karim <garram.ka...@gmail.com> wrote: > I am using dream weaver so when I deleted the heading > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > the problem of plotting the openlayer map was resolved > Now my problem is still the mapping between the data to plot in the > map and the multipolygon field, in my object definition > > On Apr 18, 1:12 pm, GARRAM karim <garram.ka...@gmail.com> wrote: > > > > > > > > > I am working on a GeoDjango project. I have a model.py wich extend the > > user model and contains a MultiPolygonField > > > class Membre(models.Model): > > user = models.ForeignKey(User, unique=True) > > > #some other attributes > > > mpoly = models.MultiPolygonField() > > objects = models.GeoManager() > > > class MembreForm(ModelForm): > > class Meta: > > model = Membre > > exclude = ('user',) > > > The form for this model works fine in the admin site. I am now > > building the front office for it. > > The problem that I'am facing is that in the resulting form I get a > > mpoly (the mutipolygonfield) as a text area, I am facing the same > > problem as: > > >http://stackoverflow.com/questions/559431/how-to-display-data-using-o... > > > I tryed to use OpenLayer script in my template to simply plot a > > OpenLayer map but it didn't work (it worked for simple html pages). Is > > there a GeoDjango specific tag to do that? > > > I think there is maybe a way to do this by using the (GeoDjango Admin > > widget) but how to do it? > > > How can I use google map api for this field in both admin site and the > > template I'm working on? -- 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-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.