Skip to content

Commit

Permalink
implement small view to return latest and current version as json, #2
Browse files Browse the repository at this point in the history
  • Loading branch information
noxan committed Jun 7, 2015
1 parent ac44d83 commit 9a965ca
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion versioncheck/views.py
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# Create your views here.
from django.http import JsonResponse
from django.views.generic import View

from versioncheck import utils


class VersionView(View):
def get(self, request):
return JsonResponse({
'current': utils.get_version(),
'latest': utils.get_latest_version(),
})

0 comments on commit 9a965ca

Please sign in to comment.