force = options.get('force')
guess = options.get('guess')
dry_run = options.get('dry_run')
- new_slug = options.get('new_slug')
- new_title = options.get('new_title')
+ new_slug = options.get('new_slug').decode('utf-8')
+ new_title = options.get('new_title').decode('utf-8')
verbose = options.get('verbose')
if guess:
"""
Publishes a book on behalf of a (local) user.
"""
+ raise NotImplementedError("Publishing not possible yet.")
+
from apiclient import api_call
changes = self.get_current_changes(publishable=True)
{% endcomment %}
</p>
+ {% trans "This book cannot be published yet" %}
+ {% comment %}
<!--
Angel photos:
Angels in Ely Cathedral (http://www.flickr.com/photos/21804434@N02/4483220595/) /
<button id="publish-button" type="submit">
<span>{% trans "Publish" %}</span></button>
<img src="{{ STATIC_URL }}img/angel-right.png" style="vertical-align: middle" />
- </form></p>
+ </form>
+ {% endcomment %}
{% else %}
{% trans "This book cannot be published yet" %}
{% endif %}
creator = request.user
else:
creator = None
- book = Book.objects.create(
+ book = Book.create(
+ text=form.cleaned_data['text'],
+ creator=creator,
slug=form.cleaned_data['slug'],
title=form.cleaned_data['title'],
)
- book.chunk_set.all().update(creator=creator)
- book[0].commit(text=form.cleaned_data['text'], author=creator)
return http.HttpResponseRedirect(reverse("wiki_editor", args=[book.slug]))
else:
if not error_list:
for filename, slug, title in ok_list:
- Book.create(creator=creator,
+ book = Book.create(
+ text=zip.read(filename).decode('utf-8'),
+ creator=creator,
slug=slug,
title=title,
- text=zip.read(filename).decode('utf-8'),
)
return direct_to_template(request, "catalogue/document_upload.html", extra_context={
import djcelery
djcelery.setup_loader()
-
+BROKER_BACKEND = "djkombu.transport.DatabaseTransport"
+BROKER_HOST = "localhost"
+BROKER_PORT = 5672
+BROKER_USER = "guest"
+BROKER_PASSWORD = "guest"
+BROKER_VHOST = "/"
SHOW_APP_VERSION = False
},
'catalogue': {
'source_filenames': (
- 'js/catalogue.js',
+ 'js/catalogue/catalogue.js',
'js/slugify.js',
),
'output_filename': 'compressed/catalogue_scripts_?.js',
#catalogue_layout_left_column {
overflow: visible;
float: left;
- /*max-width: 50%;*/
+ max-width: 60%;
padding-right: 2%;
border-right: 1px dashed black;
#catalogue_layout_right_column {
float: left;
- max-width: 35%;
+ max-width: 30%;
margin-left: 5%;
}
#publish-button:active {
background: -moz-linear-gradient(top, #88f, #fff);
}
+
+
+/* book list */
+
+.book-search-column input {
+ width: 96%;
+}
+