Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
últimas movidas para que ciertas acciones no se puedan realizar desde…
… la versión embedded por que queda la cagada
- Loading branch information
Felipe Álvarez
committed
Aug 18, 2016
1 parent
f23c974
commit b09e571
Showing
6 changed files
with
51 additions
and
27 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
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from django.views.generic import View | ||
|
||
|
||
class EmbeddedViewBase(View): | ||
layout = 'base.html' | ||
embedded_layout = 'embedded_base.html' | ||
is_embedded = False | ||
|
||
def get_context_data(self, * args, **kwargs): | ||
context = super(EmbeddedViewBase, self).get_context_data(* args, **kwargs) | ||
if self.is_embedded: | ||
self.layout = self.embedded_layout | ||
context['layout'] = self.layout | ||
context['is_embedded'] = self.is_embedded | ||
return context |