fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f5cf234
)
fixes
author
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Tue, 4 Oct 2011 15:00:34 +0000
(17:00 +0200)
committer
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Tue, 4 Oct 2011 15:00:34 +0000
(17:00 +0200)
apps/catalogue/management/commands/merge_books.py
patch
|
blob
|
history
apps/catalogue/models/book.py
patch
|
blob
|
history
apps/catalogue/templates/catalogue/book_detail.html
patch
|
blob
|
history
apps/catalogue/views.py
patch
|
blob
|
history
redakcja/settings/common.py
patch
|
blob
|
history
redakcja/settings/compress.py
patch
|
blob
|
history
redakcja/static/css/filelist.css
patch
|
blob
|
history
diff --git
a/apps/catalogue/management/commands/merge_books.py
b/apps/catalogue/management/commands/merge_books.py
index
00014df
..
aec113e
100755
(executable)
--- a/
apps/catalogue/management/commands/merge_books.py
+++ b/
apps/catalogue/management/commands/merge_books.py
@@
-111,8
+111,8
@@
class Command(BaseCommand):
force = options.get('force')
guess = options.get('guess')
dry_run = options.get('dry_run')
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:
verbose = options.get('verbose')
if guess:
diff --git
a/apps/catalogue/models/book.py
b/apps/catalogue/models/book.py
index
9f809b8
..
1b043a4
100755
(executable)
--- a/
apps/catalogue/models/book.py
+++ b/
apps/catalogue/models/book.py
@@
-278,6
+278,8
@@
class Book(models.Model):
"""
Publishes a book on behalf of a (local) user.
"""
"""
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)
from apiclient import api_call
changes = self.get_current_changes(publishable=True)
diff --git
a/apps/catalogue/templates/catalogue/book_detail.html
b/apps/catalogue/templates/catalogue/book_detail.html
index
b93fce4
..
8e9c1f1
100755
(executable)
--- a/
apps/catalogue/templates/catalogue/book_detail.html
+++ b/
apps/catalogue/templates/catalogue/book_detail.html
@@
-79,6
+79,8
@@
{% endcomment %}
</p>
{% endcomment %}
</p>
+ {% trans "This book cannot be published yet" %}
+ {% comment %}
<!--
Angel photos:
Angels in Ely Cathedral (http://www.flickr.com/photos/21804434@N02/4483220595/) /
<!--
Angel photos:
Angels in Ely Cathedral (http://www.flickr.com/photos/21804434@N02/4483220595/) /
@@
-90,7
+92,8
@@
<button id="publish-button" type="submit">
<span>{% trans "Publish" %}</span></button>
<img src="{{ STATIC_URL }}img/angel-right.png" style="vertical-align: middle" />
<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 %}
{% else %}
{% trans "This book cannot be published yet" %}
{% endif %}
diff --git
a/apps/catalogue/views.py
b/apps/catalogue/views.py
index
aa214de
..
ef042de
100644
(file)
--- a/
apps/catalogue/views.py
+++ b/
apps/catalogue/views.py
@@
-88,12
+88,12
@@
def create_missing(request, slug=None):
creator = request.user
else:
creator = None
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'],
)
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:
return http.HttpResponseRedirect(reverse("wiki_editor", args=[book.slug]))
else:
@@
-147,10
+147,11
@@
def upload(request):
if not error_list:
for filename, slug, title in ok_list:
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,
slug=slug,
title=title,
- text=zip.read(filename).decode('utf-8'),
)
return direct_to_template(request, "catalogue/document_upload.html", extra_context={
)
return direct_to_template(request, "catalogue/document_upload.html", extra_context={
diff --git
a/redakcja/settings/common.py
b/redakcja/settings/common.py
index
5414246
..
5a337fb
100644
(file)
--- a/
redakcja/settings/common.py
+++ b/
redakcja/settings/common.py
@@
-139,8
+139,13
@@
IMAGE_DIR = 'images'
import djcelery
djcelery.setup_loader()
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
SHOW_APP_VERSION = False
diff --git
a/redakcja/settings/compress.py
b/redakcja/settings/compress.py
index
e4b5b08
..
5637cee
100644
(file)
--- a/
redakcja/settings/compress.py
+++ b/
redakcja/settings/compress.py
@@
-61,7
+61,7
@@
COMPRESS_JS = {
},
'catalogue': {
'source_filenames': (
},
'catalogue': {
'source_filenames': (
- 'js/catalogue.js',
+ 'js/catalogue
/catalogue
.js',
'js/slugify.js',
),
'output_filename': 'compressed/catalogue_scripts_?.js',
'js/slugify.js',
),
'output_filename': 'compressed/catalogue_scripts_?.js',
diff --git
a/redakcja/static/css/filelist.css
b/redakcja/static/css/filelist.css
index
36bffdf
..
c81ee78
100644
(file)
--- a/
redakcja/static/css/filelist.css
+++ b/
redakcja/static/css/filelist.css
@@
-61,7
+61,7
@@
body {
#catalogue_layout_left_column {
overflow: visible;
float: left;
#catalogue_layout_left_column {
overflow: visible;
float: left;
- /*max-width: 50%;*/
+ max-width: 60%;
padding-right: 2%;
border-right: 1px dashed black;
padding-right: 2%;
border-right: 1px dashed black;
@@
-69,7
+69,7
@@
body {
#catalogue_layout_right_column {
float: left;
#catalogue_layout_right_column {
float: left;
- max-width: 3
5
%;
+ max-width: 3
0
%;
margin-left: 5%;
}
margin-left: 5%;
}
@@
-167,3
+167,11
@@
td {
#publish-button:active {
background: -moz-linear-gradient(top, #88f, #fff);
}
#publish-button:active {
background: -moz-linear-gradient(top, #88f, #fff);
}
+
+
+/* book list */
+
+.book-search-column input {
+ width: 96%;
+}
+