forked from edelvalle/reactor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove turbolinks from reactor, rename push_state and replace_state t…
…o visit and use Turbo if available
- Loading branch information
Showing
10 changed files
with
524 additions
and
189 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,2 @@ | ||
from django.core.checks import Warning, register | ||
|
||
|
||
default_app_config = 'reactor.app.Reactor' | ||
|
||
|
||
@register() | ||
def check_for_turbolinks_middleware(app_configs, **kwargs): | ||
from . import settings | ||
from django.conf import settings as dj_settings | ||
|
||
reactor_middleware = 'reactor.middleware.turbolinks_middleware' | ||
problem = ( | ||
settings.INCLUDE_TURBOLINKS and | ||
reactor_middleware not in dj_settings.MIDDLEWARE | ||
) | ||
if problem: | ||
return [Warning( | ||
'Turbolinks middleware is missing', | ||
hint=( | ||
f'When you set REACTOR_INCLUDE_TURBOLINKS, during the ' | ||
f'redirects the URL of the browser could be that is not up to ' | ||
f'date. To avoid that include `{reactor_middleware}` in the ' | ||
f'`MIDDLEWARE`.' | ||
), | ||
id='reactor.W001', | ||
)] | ||
else: | ||
return [] |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.