Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getnikola/coil
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dcff05f0512d
Choose a base ref
...
head repository: getnikola/coil
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ddbbc7ab1a26
Choose a head ref
  • 4 commits
  • 19 files changed
  • 1 contributor

Commits on May 8, 2015

  1. initial draft of single mode (#36)

    Signed-off-by: Chris Warrick <kwpolska@gmail.com>
    Kwpolska committed May 8, 2015
    Copy the full SHA
    87e83a2 View commit details

Commits on May 9, 2015

  1. finish and document Limited mode

    Signed-off-by: Chris Warrick <kwpolska@gmail.com>
    Kwpolska committed May 9, 2015
    Copy the full SHA
    707141a View commit details
  2. Version 1.2.0

    Signed-off-by: Chris Warrick <kwpolska@gmail.com>
    Kwpolska committed May 9, 2015
    Copy the full SHA
    bb280a4 View commit details
  3. Version 1.2.0

    Signed-off-by: Chris Warrick <kwpolska@gmail.com>
    Kwpolska committed May 9, 2015
    Copy the full SHA
    ddbbc7a View commit details
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -2,6 +2,12 @@
Appendix A. Changelog
=====================

v1.2.0
------

* Added support for a Limited mode, which does not require Redis and rq
* Nikola v7.4.0 compatibility

v1.1.0
------

4 changes: 2 additions & 2 deletions coil/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Coil CMS v1.1.0
# Coil CMS v1.2.0
# Copyright © 2014-2015 Chris Warrick, Roberto Alsina, Henry Hirsch et al.

# Permission is hereby granted, free of charge, to any
@@ -29,4 +29,4 @@

__all__ = ['__version__']

__version__ = '1.1.0'
__version__ = '1.2.0'
2 changes: 1 addition & 1 deletion coil/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Coil CMS v1.1.0
# Coil CMS v1.2.0
# Copyright © 2014-2015 Chris Warrick, Roberto Alsina, Henry Hirsch et al.

# Permission is hereby granted, free of charge, to any
2 changes: 1 addition & 1 deletion coil/data/templates/convert.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
import os
import sys
sys.path.append('/home/kwpolska/git/nikola/scripts')
import jinjify
import jinjify # NOQA

files = os.listdir('mako/')
for i in files:
56 changes: 56 additions & 0 deletions coil/data/templates/jinja/coil_account_single.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{# -*- coding: utf-8 -*- #}
{% extends 'base.tmpl' %}
{% block content %}
<div class="page-header">
<h1>Account <tt>{{ current_user.username }}</tt></h1>
</div>

{% if alert %}
<div class="alert alert-{{ alert_status }}" role="alert">{{ alert }}</div>
{% endif %}

<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Profile</h3>
</div>
<div class="panel-body form-horizontal">

<p>In order to change your details, please contact an
administrator.</p>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">Real name</label>
<div class="col-sm-10"><input class="form-control" id="realname" name="realname" value="{{ current_user.realname }}" placeholder="Real name" required disabled></div>
</div>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">E-mail address</label>
<div class="col-sm-10"><input class="form-control" id="email" name="email" type="email" value="{{ current_user.email }}" placeholder="E-mail address" required disabled></div>
</div>
</div>
</div>

<form action="{{ url_for('acp_pwdhash') }}" method="POST" class="form-horizontal">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Password change</h3>
</div>
<div class="panel-body">
<p>In order to change your password, please contact an
administrator and provide them with a <strong>hash</strong> of your
desired password. Generate a secure hash below.</p>
<div class="form-group">
<label for="newpwd1" class="col-sm-2 control-label">New password</label>
<div class="col-sm-10"><input type="password" class="form-control" id="newpwd1" name="newpwd1" placeholder="New password"></div>
</div>
<div class="form-group">
<label for="newpwd2" class="col-sm-2 control-label">Repeat password</label>
<div class="col-sm-10"><input type="password" class="form-control" id="newpwd2" name="newpwd2" placeholder="Repeat new password"></div>
</div>
</div>
</div>
{{ form.csrf_token }}
<div style="text-align: center;">
<button type="submit" class="btn btn-primary btn-lg save-btn"><i class="fa fa-key fa-fw"></i> Generate hash</button>
</div>
</form>

{% endblock %}
39 changes: 39 additions & 0 deletions coil/data/templates/jinja/coil_pwdhash.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{# -*- coding: utf-8 -*- #}
{% extends 'base.tmpl' %}
{% block content %}
<div class="page-header">
<h1>Account <tt>{{ current_user.username }}</tt></h1>
</div>

<form action="{{ url_for('acp_pwdhash') }}" method="POST" class="form-horizontal">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Password change</h3>
</div>
{% if status %}
<div class="panel-body">
<p class="text-success">Please provide the following hash to your
administrator:</p>
<p><code>{{ pwdhash }}</code></p>
</div>
{% else %}
<div class="panel-body">
<p class="text-danger">The passwords did not match. Please try again.</p>
<div class="form-group">
<label for="newpwd1" class="col-sm-2 control-label">New password</label>
<div class="col-sm-10"><input type="password" class="form-control" id="newpwd1" name="newpwd1" placeholder="New password"></div>
</div>
<div class="form-group">
<label for="newpwd2" class="col-sm-2 control-label">Repeat password</label>
<div class="col-sm-10"><input type="password" class="form-control" id="newpwd2" name="newpwd2" placeholder="Repeat new password"></div>
</div>
</div>
</div>
{{ form.csrf_token }}
<div style="text-align: center;">
<button type="submit" class="btn btn-primary btn-lg save-btn"><i class="fa fa-key fa-fw"></i> Generate hash</button>
</div>
{% endif %}
</form>

{% endblock %}
42 changes: 42 additions & 0 deletions coil/data/templates/jinja/coil_rebuild_single.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{# -*- coding: utf-8 -*- #}
{% extends 'base.tmpl' %}
{% block content %}
<div class="page-header">
<h1 class="build-status-caption"><i class="build-status-icon fa fa-fw fa-cog"></i> Rebuild</h1>
</div>

<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">
<a data-toggle="collapse" href="#collapseOutput" aria-expanded="false" aria-controls="collapseOutput"><i class="fa fa-bars"></i> Advanced information</a>
</h3></div>
<div class="panel-body collapse" id="collapseOutput">
<h4>Build</h4>
<pre><code id="outputb">{{ outputb }}</code></pre>

<h4>Unused files removed</h4>
<pre><code id="outputo">{{ outputo }}</code></pre>
</div>
</div>

{% endblock %}

{% block extra_js %}
<script>
$(document).ready(function() {
fs = $('.build-status-icon');
fsc = $('.build-status-caption');
if ({{ status }} == 1) {
fs.removeClass('fa-cog');
fs.addClass('fa-check');
fsc.addClass('text-success');
} else {
fs.removeClass('fa-cog');
fs.addClass('fa-times');
fsc.addClass('text-danger');
$("#collapseOutput").collapse({
show: true
});
}
});
</script>
{% endblock %}
56 changes: 56 additions & 0 deletions coil/data/templates/mako/coil_account_single.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%block name="content">
<div class="page-header">
<h1>Account <tt>${current_user.username}</tt></h1>
</div>

% if alert:
<div class="alert alert-${alert_status}" role="alert">${alert}</div>
% endif

<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Profile</h3>
</div>
<div class="panel-body form-horizontal">

<p>In order to change your details, please contact an
administrator.</p>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">Real name</label>
<div class="col-sm-10"><input class="form-control" id="realname" name="realname" value="${current_user.realname}" placeholder="Real name" required disabled></div>
</div>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">E-mail address</label>
<div class="col-sm-10"><input class="form-control" id="email" name="email" type="email" value="${current_user.email}" placeholder="E-mail address" required disabled></div>
</div>
</div>
</div>

<form action="${url_for('acp_pwdhash')}" method="POST" class="form-horizontal">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Password change</h3>
</div>
<div class="panel-body">
<p>In order to change your password, please contact an
administrator and provide them with a <strong>hash</strong> of your
desired password. Generate a secure hash below.</p>
<div class="form-group">
<label for="newpwd1" class="col-sm-2 control-label">New password</label>
<div class="col-sm-10"><input type="password" class="form-control" id="newpwd1" name="newpwd1" placeholder="New password"></div>
</div>
<div class="form-group">
<label for="newpwd2" class="col-sm-2 control-label">Repeat password</label>
<div class="col-sm-10"><input type="password" class="form-control" id="newpwd2" name="newpwd2" placeholder="Repeat new password"></div>
</div>
</div>
</div>
${form.csrf_token}
<div style="text-align: center;">
<button type="submit" class="btn btn-primary btn-lg save-btn"><i class="fa fa-key fa-fw"></i> Generate hash</button>
</div>
</form>

</%block>
39 changes: 39 additions & 0 deletions coil/data/templates/mako/coil_pwdhash.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%block name="content">
<div class="page-header">
<h1>Account <tt>${current_user.username}</tt></h1>
</div>

<form action="${url_for('acp_pwdhash')}" method="POST" class="form-horizontal">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Password change</h3>
</div>
% if status:
<div class="panel-body">
<p class="text-success">Please provide the following hash to your
administrator:</p>
<p><code>${pwdhash}</code></p>
</div>
% else:
<div class="panel-body">
<p class="text-danger">The passwords did not match. Please try again.</p>
<div class="form-group">
<label for="newpwd1" class="col-sm-2 control-label">New password</label>
<div class="col-sm-10"><input type="password" class="form-control" id="newpwd1" name="newpwd1" placeholder="New password"></div>
</div>
<div class="form-group">
<label for="newpwd2" class="col-sm-2 control-label">Repeat password</label>
<div class="col-sm-10"><input type="password" class="form-control" id="newpwd2" name="newpwd2" placeholder="Repeat new password"></div>
</div>
</div>
</div>
${form.csrf_token}
<div style="text-align: center;">
<button type="submit" class="btn btn-primary btn-lg save-btn"><i class="fa fa-key fa-fw"></i> Generate hash</button>
</div>
% endif
</form>

</%block>
42 changes: 42 additions & 0 deletions coil/data/templates/mako/coil_rebuild_single.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%block name="content">
<div class="page-header">
<h1 class="build-status-caption"><i class="build-status-icon fa fa-fw fa-cog"></i> Rebuild</h1>
</div>

<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">
<a data-toggle="collapse" href="#collapseOutput" aria-expanded="false" aria-controls="collapseOutput"><i class="fa fa-bars"></i> Advanced information</a>
</h3></div>
<div class="panel-body collapse" id="collapseOutput">
<h4>Build</h4>
<pre><code id="outputb">${outputb}</code></pre>

<h4>Unused files removed</h4>
<pre><code id="outputo">${outputo}</code></pre>
</div>
</div>

</%block>

<%block name="extra_js">
<script>
$(document).ready(function() {
fs = $('.build-status-icon');
fsc = $('.build-status-caption');
if (${status} == 1) {
fs.removeClass('fa-cog');
fs.addClass('fa-check');
fsc.addClass('text-success');
} else {
fs.removeClass('fa-cog');
fs.addClass('fa-times');
fsc.addClass('text-danger');
$("#collapseOutput").collapse({
show: true
});
}
});
</script>
</%block>
9 changes: 8 additions & 1 deletion coil/forms.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Coil CMS v1.1.0
# Coil CMS v1.2.0
# Copyright © 2014-2015 Chris Warrick, Roberto Alsina, Henry Hirsch et al.

# Permission is hereby granted, free of charge, to any
@@ -73,6 +73,7 @@ class UserImportForm(Form):
"""A user import form."""
tsv = FileField("TSV File")


class UserEditForm(Form):
"""A user editor form, used for CSRF protection only."""
pass
@@ -81,3 +82,9 @@ class UserEditForm(Form):
class PermissionsForm(Form):
"""A permissions form, used for CSRF protection only."""
pass


class PwdHashForm(Form):
"""A password hash form."""
newpwd1 = TextField('New password', validators=[Required()])
newpwd2 = TextField('Repeat new password', validators=[Required()])
2 changes: 1 addition & 1 deletion coil/init.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Coil CMS v1.1.0
# Coil CMS v1.2.0
# Copyright © 2014-2015 Chris Warrick, Roberto Alsina, Henry Hirsch et al.

# Permission is hereby granted, free of charge, to any
Loading