created_dt is separate
This commit is contained in:
parent
decef3f6a7
commit
bb24a5172c
1
sensitive_dev.py
Normal file
1
sensitive_dev.py
Normal file
@ -0,0 +1 @@
|
||||
ADMIN_PASSWORD = "password"
|
@ -1,12 +1,14 @@
|
||||
from oshipka.persistance import db, ModelController, index_service, LiberalBoolean, Ownable, Datable
|
||||
from oshipka.persistance import db, ModelController, index_service, LiberalBoolean, Ownable
|
||||
|
||||
|
||||
class BlogPost(db.Model, ModelController, Ownable, Datable):
|
||||
class BlogPost(db.Model, ModelController, Ownable):
|
||||
__searchable__ = ['body', ]
|
||||
|
||||
filename = db.Column(db.UnicodeText,)
|
||||
title = db.Column(db.UnicodeText,)
|
||||
body = db.Column(db.UnicodeText,)
|
||||
created_dt = db.Column(db.UnicodeText,)
|
||||
updated_dt = db.Column(db.UnicodeText,)
|
||||
|
||||
|
||||
index_service.searchables.append(BlogPost)
|
||||
|
@ -21,6 +21,20 @@
|
||||
<textarea id="input-blog_post-body"
|
||||
name="body"></textarea>
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
<label for="input-blog_post-created_dt">{{ _("created_dt") }}</label>:
|
||||
</td><td>
|
||||
<input id="input-blog_post-created_dt"
|
||||
type="text" name="created_dt" autocomplete="off"
|
||||
/>
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
<label for="input-blog_post-updated_dt">{{ _("updated_dt") }}</label>:
|
||||
</td><td>
|
||||
<input id="input-blog_post-updated_dt"
|
||||
type="text" name="updated_dt" autocomplete="off"
|
||||
/>
|
||||
</td></tr>
|
||||
</table>
|
||||
<input type="submit">
|
||||
</form>
|
@ -7,4 +7,10 @@
|
||||
{% endif %}
|
||||
{% if "body" not in skip_list %}
|
||||
<li id="display-blog_post-body"><strong>{{ _("body") }}</strong>: {{ instance.body }}</li>
|
||||
{% endif %}
|
||||
{% if "created_dt" not in skip_list %}
|
||||
<li id="display-blog_post-created_dt"><strong>{{ _("created_dt") }}</strong>: {{ instance.created_dt }}</li>
|
||||
{% endif %}
|
||||
{% if "updated_dt" not in skip_list %}
|
||||
<li id="display-blog_post-updated_dt"><strong>{{ _("updated_dt") }}</strong>: {{ instance.updated_dt }}</li>
|
||||
{% endif %}
|
@ -10,6 +10,12 @@
|
||||
{% if "body" not in skip_columns %}
|
||||
<th>{{ _("body") }}</th>
|
||||
{% endif %}
|
||||
{% if "created_dt" not in skip_columns %}
|
||||
<th>{{ _("created_dt") }}</th>
|
||||
{% endif %}
|
||||
{% if "updated_dt" not in skip_columns %}
|
||||
<th>{{ _("updated_dt") }}</th>
|
||||
{% endif %}
|
||||
<th>{{ _("Actions") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -31,6 +37,16 @@
|
||||
{{ instance.body }}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if "created_dt" not in skip_columns %}
|
||||
<td>
|
||||
{{ instance.created_dt }}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if "updated_dt" not in skip_columns %}
|
||||
<td>
|
||||
{{ instance.updated_dt }}
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
<a href="{{ url_for('update_blog_post', uuid=instance.id, _next=request.path) }}">e</a> |
|
||||
<a href="{{ url_for('delete_blog_post', uuid=instance.id, _next=request.path) }}">x</a>
|
||||
|
@ -23,6 +23,22 @@
|
||||
<textarea id="input-blog_post-body"
|
||||
name="body">{{ instance.body }}</textarea>
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
<label for="input-blog_post-created_dt">{{ _("created_dt") }}</label>:
|
||||
</td><td>
|
||||
<input id="input-blog_post-created_dt"
|
||||
value="{{ instance.created_dt }}"
|
||||
type="text" name="created_dt" autocomplete="off"
|
||||
/>
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
<label for="input-blog_post-updated_dt">{{ _("updated_dt") }}</label>:
|
||||
</td><td>
|
||||
<input id="input-blog_post-updated_dt"
|
||||
value="{{ instance.updated_dt }}"
|
||||
type="text" name="updated_dt" autocomplete="off"
|
||||
/>
|
||||
</td></tr>
|
||||
</table>
|
||||
<input type="submit">
|
||||
</form>
|
@ -3,7 +3,6 @@ searchable:
|
||||
- body
|
||||
interits:
|
||||
- Ownable
|
||||
- Datable
|
||||
access:
|
||||
- verb: all
|
||||
login_required: true
|
||||
@ -21,4 +20,6 @@ columns:
|
||||
- name: filename
|
||||
- name: title
|
||||
- name: body
|
||||
type: long_text
|
||||
type: long_text
|
||||
- name: created_dt
|
||||
- name: updated_dt
|
Loading…
Reference in New Issue
Block a user