Skip to content

How can I get only the boroughs of a city without the districts? #207

Open
@sowinski

Description

Hi,

is it possible to get only the boroughs of a city?

Example:
berlin = City.objects.filter(name="Berlin")[0]
len(District.objects.filter(city=berlin))
This should be 12 but gives me 205 because it includes boroughs and districts.
https://en.wikipedia.org/wiki/Boroughs_and_neighborhoods_of_Berlin

Thank you :)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions