To filter your model instances with a polygon boundary, you can use the intersects lookup. So for instance
from django.contrib.gis.geos import Polygon
from myapp.models import MyVillages
poly = Polygon(((0.0, 0.0), (0.0, 50.0), (50.0, 50.0), (50.0, 0.0), (0.0, 0.0)))
villages = MyVillages.objects.filter(geom__intersects=poly)
The villages queryset will then be a list of MyVillage models of which the boundaries overlap with the query polygon (assuming your geometry field is called "geom").
To pass the data to your template, it depends on how you construct your map with openlayers, so you would probably run the query above within a view and return the villages queryset to the template as a context variable.
Another option would be to use the django-rest-framework to create an api endpoint and then query that directly through javascript, see this answer for more information.
Edit - Example for MyVillage model:
from django.contrib.gis.db import models
class MyVillage(models.Model):
name = models.CharField(max_length=500)
osmid = models.IntegerField()
geom = models.MultiPolygonField()
objects = models.GeoManager()
Then you can also filter by the osm id of course. Note that this is not a geographic query and the get method will give an error if the osmid does not exist in the database:
single_vilage = MyVillage.objects.get(osmid=3802015)
or if you want to see if it exists
MyVillage.objects.filter(osmid__in=3802015).exists()