Mobile optimization
* adds table-responsive class to BaseClass * adds html meta attributes for proper small device rendering
This commit is contained in:
parent
6c4ced784b
commit
0c2d51b2b1
@ -27,7 +27,7 @@ class BaseTable(tables.tables.Table):
|
|||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
attrs = {
|
attrs = {
|
||||||
"class": "table table-hover",
|
"class": "table table-hover table-responsive-md table-responsive-sm",
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, request: HttpRequest = None, filter_set=None, queryset=None, *args, **kwargs):
|
def __init__(self, request: HttpRequest = None, filter_set=None, queryset=None, *args, **kwargs):
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<html lang="{{ language }}">
|
<html lang="{{ language }}">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>{{ base_title }}</title>
|
<title>{{ base_title }}</title>
|
||||||
{% bootstrap_css %}
|
{% bootstrap_css %}
|
||||||
{% bootstrap_javascript jquery='full' %}
|
{% bootstrap_javascript jquery='full' %}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 col-lg-4 border">
|
<div class="col-md-6 col-lg-4 border">
|
||||||
<table class="table">
|
<table class="table table-responsive">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans 'Username' %}</th>
|
<th scope="row">{% trans 'Username' %}</th>
|
||||||
<td>{{user.username}}</td>
|
<td>{{user.username}}</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user