This repository has been archived by the owner on Dec 9, 2019. It is now read-only.
forked from howiworkdaily/django-freetext
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If cache_time is set to 0, don't even try caching. Closing #7
- Loading branch information
Showing
5 changed files
with
46 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,12 @@ | |||
{% load flatblock_tags %}<!DOCTYPE HTML> | |||
<html> | |||
<head> | |||
<meta charset="UTF-8" /> | |||
<title>Test page for flatblock rendering</title> | |||
</head> | |||
<body> | |||
{% flatblock 'test1' 0 %} <!-- No caching --> | |||
{% flatblock 'test2' 10 %} <!-- 10s caching --> | |||
{% flatblock 'test3' None %} <!-- Default length caching --> | |||
</body> | |||
</html> |
This file contains 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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,10 +1,12 @@ | |||
from django.conf.urls.defaults import * | from django.conf.urls.defaults import * | ||
from django.contrib.admin.views.decorators import staff_member_required | from django.contrib.admin.views.decorators import staff_member_required | ||
from django.contrib import admin | from django.contrib import admin | ||
from . import views | |||
|
|
||
admin.autodiscover() | admin.autodiscover() | ||
|
|
||
urlpatterns = patterns('', | urlpatterns = patterns('', | ||
url('^flatblocks/', include("flatblocks.urls")), | url('^flatblocks/', include("flatblocks.urls")), | ||
url('^admin/', include(admin.site.urls)), | url('^admin/', include(admin.site.urls)), | ||
url('^/?', views.index), | |||
) | ) |
This file contains 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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
from django.shortcuts import render_to_response | |||
|
|||
|
|||
def index(request): | |||
return render_to_response('index.html') |