Unverified Commit 53d979d1 authored by CapsLock's avatar CapsLock

[details] sql script, messages when no hostname or no picture available for a hostname

parent 10ee3a85
CREATE USER avecmonfai with password 'avecmonfai';
CREATE DATABASE avecmonfai owner avecmonfai;
CREATE TABLE pictures(id serial PRIMARY KEY, filename VARCHAR(250) NOT NULL, description VARCHAR(500), created_on TIMESTAMP NOT NULL);
CREATE TABLE domain_names(id serial PRIMARY KEY, name VARCHAR(800) NOT NULL, related_to integer, created_on TIMESTAMP NOT NULL);
CREATE TABLE pictures_domain_names(id serial PRIMARY KEY, picture_id integer, domain_name_id integer, created_on TIMESTAMP NOT NULL);
grant all on pictures to avecmonfai
grant all on domain_names to avecmonfai
grant all on pictures_domain_names to avecmonfai
grant all on pictures_id_seq to avecmonfai;
grant all on domain_names_id_seq to avecmonfai;
grant all on pictures_id_seq to avecmonfai;
grant all on pictures_domain_names_id_seq to avecmonfai;
\ No newline at end of file
......@@ -51,6 +51,22 @@
% item_count = 0
% tag_closed = True
% if len(domain_names) == 0 and not display_new_links:
<div class="row">
<div class="alert-box success">
No hostname created yet /o\
</div>
</div>
% end
% if len(pictures) == 0 and display_new_links:
<div class="row">
<div class="alert-box success">
This category has no picture. It's up to you to upload one <3
</div>
</div>
% end
% for p in pictures:
% if item_count % 3 == 0:
<div class="row">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment