Commit 9c280705 authored by Roman Shishkin's avatar Roman Shishkin

Исправленный celery-worker, измененные стили

parent 9e979e3a
from celery import execute
import logging
from celery import Celery
# XXX: Does not work properly
Logger = logging.getLogger()
Logger.setLevel(logging.DEBUG)
execute.send_task("tasks.topic_index", countdown=3)
app = Celery('tasks', broker='redis://127.0.0.1:6379/5', backend='redis://127.0.0.1:6379/6')
app.send_task('tasks.topic_index')
\ No newline at end of file
......@@ -16,6 +16,10 @@ class CreateController {
}
};
$scope.send = () => {
alert();
}
}
}
......
......@@ -3,17 +3,19 @@
<img class="header__image" src="/static/images/true_logo.png" alt="ЛЕНТАЧ">
<h1>Предложи нам новость!</h1>
</header>
<form>
<div class="alert alert-info">{{flash_text}}</div>
<div class="alert alert-danger">{{flash_text}}</div>
<form ng-submit="send()">
<div class="input-group">
<label for="summary">
Описание:
</label>
<input type="text" id="summary" class="form-control" placeholder="Краткое описание вашей новости">
<input type="text" id="summary" ng-model="summary" class="form-control" required placeholder="Краткое описание вашей новости">
</div>
<div class="input-group">
<label for="link0">
Ссылки:
Ссылки (не более 5):
</label>
<input type="text" ng-model="link[0]" ng-change="show(0)" name="link0" id="link0" class="form-control" placeholder="Ссылки на источники, издания или ресурсы">
<div ng-repeat="content in contents">
......@@ -26,7 +28,7 @@
<label for="text">
Текст новости:
</label>
<textarea id="text" rows="1" style="height:1em;" class="form-control" onkeyup="countChar(this)"
<textarea id="text" ng-model="text" rows="1" style="height:1em;" class="form-control" onkeyup="countChar(this)"
onclick="init()" placeholder="Подробно оформите вашу новость"></textarea>
</div>
......@@ -44,7 +46,7 @@
}
function init() {
var text = document.getElementById('text');
let text = document.getElementById('text');
function resize() {
text.style.height = 'auto';
......@@ -83,7 +85,7 @@
</script>
<div class="row">
<div class="col-md-7" ng-controller="PhotosUploadController">
<div class="col-md-7 col-xs-4" ng-controller="PhotosUploadController">
<input type="file" id="file_upload" nv-file-select uploader="uploader" style="display: none"/>
<div class="image-list">
<div class="image-list__btn">
......@@ -94,12 +96,12 @@
</div>
</div>
</div>
<div class="col-md-2">
<div class="col-md-2 col-xs-4">
<div class="charNum-container"><label id="charNum"> </label></div>
</div>
<div class="col-md-3">
<div class="col-md-3 col-xs-4">
<div class="btn-group">
<div class="container-fluid button-container no-mar-pad">
<div class="container-fluid button-container">
<button id="submit" type="submit" class="btn btn-primary">Отправить</button>
</div>
</div>
......
......@@ -37,7 +37,7 @@ label {
}
.header__image {
max-height: 150px;
max-height: 128px;
}
@media (max-width: 1000px) {
......
......@@ -4,7 +4,7 @@
textarea {
resize: none;
min-height: 40px;
min-height: 80px;
overflow: hidden;
padding: 0;
......@@ -19,6 +19,10 @@ textarea {
display: inline-block;
}
.button-container {
padding-top: 15px;
}
.input-group label {
font-size: 16pt;
font-weight: bold;
......
......@@ -14,3 +14,4 @@ webassets==0.12.0
Werkzeug==0.11.15
vklancer
celery
redis
\ No newline at end of file
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