new press template and view
parent
00ab8f4d18
commit
db0a967963
|
@ -102,6 +102,7 @@ urlpatterns = patterns(
|
|||
url(r"^ml/status/$","ml_status", name="ml_status"),
|
||||
url(r"^ml/subscribe/$","ml_subscribe", name="ml_subscribe"),
|
||||
url(r"^ml/unsubscribe/$","ml_unsubscribe", name="ml_unsubscribe"),
|
||||
url(r"^press_new/$","press_new", name="press_new"),
|
||||
)
|
||||
|
||||
if settings.DEBUG:
|
||||
|
|
|
@ -2343,3 +2343,13 @@ def ml_subscribe(request):
|
|||
def ml_unsubscribe(request):
|
||||
request.user.profile.ml_unsubscribe()
|
||||
return HttpResponseRedirect(reverse("notification_notice_settings"))
|
||||
|
||||
def press_new(request):
|
||||
latest_items = models.Press.objects.order_by('-date')[:3]
|
||||
highlighted_items = models.Press.objects.filter(highlight=True)
|
||||
all_items = models.Press.objects.all()
|
||||
return render(request, "press_new.html", {
|
||||
'latest_items': latest_items,
|
||||
'highlighted_items': highlighted_items,
|
||||
'all_items': all_items
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue