views: remove redirect from homepage to warehouse (#30854)
This commit is contained in:
parent
5d1524702a
commit
621cfa9250
|
@ -71,14 +71,6 @@ class HomepageView(AuthorizationMixin, ListView):
|
|||
def get_queryset(self):
|
||||
return self.model.all_visualizations()
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
warehouses = get_warehouses()
|
||||
if not len(self.get_queryset()) and len(warehouses) == 1:
|
||||
engine = Engine(warehouses[0])
|
||||
return HttpResponseRedirect(reverse('warehouse', kwargs={'warehouse': engine.name}),
|
||||
status=307)
|
||||
return super(HomepageView, self).get(request, *args, **kwargs)
|
||||
|
||||
|
||||
class MenuJSONView(AuthorizationMixin, View):
|
||||
def get(self, request, *args, **kwargs):
|
||||
|
|
|
@ -11,7 +11,8 @@ from bijoe.visualization.utils import Visualization
|
|||
|
||||
def test_simple(schema1, app, admin):
|
||||
login(app, admin)
|
||||
response = app.get('/').follow()
|
||||
response = app.get('/')
|
||||
response = response.click('schema1')
|
||||
response = response.click('Facts 1')
|
||||
assert 'big-msg-info' in response
|
||||
assert u'le champ « pouët »' in response
|
||||
|
@ -41,7 +42,8 @@ def test_simple(schema1, app, admin):
|
|||
|
||||
def test_truncated_previous_year_range(schema1, app, admin, freezer):
|
||||
login(app, admin)
|
||||
response = app.get('/').follow()
|
||||
response = app.get('/')
|
||||
response = response.click('schema1')
|
||||
response = response.click('Facts 1')
|
||||
form = response.form
|
||||
form.set('representation', 'table')
|
||||
|
@ -66,7 +68,8 @@ def test_truncated_previous_year_range(schema1, app, admin, freezer):
|
|||
|
||||
def test_boolean_dimension(schema1, app, admin):
|
||||
login(app, admin)
|
||||
response = app.get('/').follow()
|
||||
response = app.get('/')
|
||||
response = response.click('schema1')
|
||||
response = response.click('Facts 1')
|
||||
form = response.form
|
||||
form.set('representation', 'table')
|
||||
|
@ -81,7 +84,8 @@ def test_boolean_dimension(schema1, app, admin):
|
|||
|
||||
def test_string_dimension(schema1, app, admin):
|
||||
login(app, admin)
|
||||
response = app.get('/').follow()
|
||||
response = app.get('/')
|
||||
response = response.click('schema1')
|
||||
response = response.click('Facts 1')
|
||||
form = response.form
|
||||
form.set('representation', 'table')
|
||||
|
@ -113,7 +117,8 @@ def test_string_dimension_json_data(schema1, app, admin):
|
|||
|
||||
def test_item_dimension(schema1, app, admin):
|
||||
login(app, admin)
|
||||
response = app.get('/').follow()
|
||||
response = app.get('/')
|
||||
response = response.click('schema1')
|
||||
response = response.click('Facts 1')
|
||||
form = response.form
|
||||
form.set('representation', 'table')
|
||||
|
@ -135,7 +140,8 @@ def test_item_dimension(schema1, app, admin):
|
|||
|
||||
def test_yearmonth_drilldown(schema1, app, admin):
|
||||
login(app, admin)
|
||||
response = app.get('/').follow()
|
||||
response = app.get('/')
|
||||
response = response.click('schema1')
|
||||
response = response.click('Facts 1')
|
||||
form = response.form
|
||||
form.set('representation', 'table')
|
||||
|
@ -151,7 +157,8 @@ def test_yearmonth_drilldown(schema1, app, admin):
|
|||
|
||||
def test_ods(schema1, app, admin):
|
||||
login(app, admin)
|
||||
response = app.get('/').follow()
|
||||
response = app.get('/')
|
||||
response = response.click('schema1')
|
||||
response = response.click('Facts 1')
|
||||
form = response.form
|
||||
form.set('representation', 'table')
|
||||
|
@ -177,7 +184,8 @@ def test_ods(schema1, app, admin):
|
|||
|
||||
def test_truncated_previous_year_range_on_datetime(schema1, app, admin, freezer):
|
||||
login(app, admin)
|
||||
response = app.get('/').follow()
|
||||
response = app.get('/')
|
||||
response = response.click('schema1')
|
||||
response = response.click('Facts 1')
|
||||
form = response.form
|
||||
form.set('representation', 'table')
|
||||
|
|
|
@ -115,7 +115,8 @@ def test_missing_data(schema1, app, admin):
|
|||
|
||||
def test_visualization_creation_view(schema1, app, admin):
|
||||
login(app, admin)
|
||||
response = app.get('/').follow()
|
||||
response = app.get('/')
|
||||
response = response.click('schema1')
|
||||
response = response.click('Facts 1')
|
||||
form = response.form
|
||||
form.set('representation', 'table')
|
||||
|
|
Loading…
Reference in New Issue