Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proper response returns, v1.0 cleanup
- Loading branch information
Showing
4 changed files
with
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
from django_seo_js.backends import SelectedBackend | ||
|
||
def update_cache_for_url(url): | ||
|
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
from django_seo_js.backends import SelectedBackend | ||
from django.http import HttpResponse | ||
|
||
|
||
class HashBangMiddleware(SelectedBackend): | ||
def process_request(self, request): | ||
if "_escaped_fragment_" in request.GET: | ||
url = "%s://%s%s" % (request.protocol, request.host, request.uri) | ||
return self.backend.get_rendered_page(url) | ||
url = request.build_absolute_uri() | ||
return HttpResponse(self.backend.get_rendered_page(url)) |
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