Created
October 31, 2016 21:44
-
-
Save rightx2/521745778cca83e8626035d59d371dff to your computer and use it in GitHub Desktop.
DetailView url_kwarg
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 django.views.generic import DetailView | |
from orders.models import Order | |
class OrderDetailView(DetailView): | |
model = Order | |
context_object_name = 'order' | |
slug_url_kwarg = 'merchant_uid' | |
slug_field = 'merchant_uid' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment