Created
August 23, 2019 09:48
-
-
Save bencleary/0e013de28dc1ac90580e5d215dd987d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from .utils import CustomerTypes | |
class CustomerView(DetailView): | |
... | |
def get_context_data(self, **kwargs): | |
... | |
if self.get_object().type == CustomerTypes.PROSPECT: | |
context["ad"] = Ad.objects.get(target=CustomerTypes.PROSPECT) | |
... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment