Suppose I have this model:
Class animals(models.Model):
name = models.CharField(max_length = 20)
and I make 3 objects of it, say ob1, ob2, ob3 with ob1.name = cat, ob2.name = dog, ob3.name = cow
Now if I have a url like this www.domain.com/cator www.domain.com/dog, How to capture /cat or /dogfrom the url and check against the names of objects of class animal?
I am trying to implement a view function that takes a parameter from the url, eg: object.name, and execute according to that object.
Any help is appreciated.