Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field names concatenated in GeoModelAdmin multiple fields per map #123

Open
GregUK opened this issue Mar 11, 2014 · 1 comment
Open

Field names concatenated in GeoModelAdmin multiple fields per map #123

GregUK opened this issue Mar 11, 2014 · 1 comment

Comments

@GregUK
Copy link

GregUK commented Mar 11, 2014

Using Django 1.6.1 with a GeoModelAdmin consisting of two maps. One with 1 geom field and the other with 2 geom fields similar to the exam for country admin shown below.

# admin.py
class CountryAdmin(GeoModelAdmin):
    options = {
        default_lat: -72,
        default_lon: 43,
    }
    maps = (
        (('big_river', 'the_dam'), { 'layers': ['google.streets'] }),
        (('little_stream',), {'overlay_style': {'stroke_color': "#0000ff"}}),
    )

Django returns an error as big_river and the_dam are joined to big_river_the_dam which causes a field lookup error

@nieuwenhuys
Copy link

Has anyone any idea on how to solve this?

Defining more than one field/overlay in maps will trigger the exception:
Unknown field(s) (geom1_geom2_geom3) specified for Testmodel. Check fields/fieldsets/exclude attributes of class TestmodelAdmin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants