forked from crunk/distribusi-verse
more text edits
This commit is contained in:
parent
67acc5ec56
commit
cefdc8cd11
@ -48,9 +48,8 @@ def AutoFillInUploadForm(uploadform, current_distribusi):
|
||||
).first()
|
||||
uploadform.sitename.data = distribusi.distribusiname
|
||||
uploadform.sitename.render_kw = {"readonly": True}
|
||||
uploadform.term.data = distribusi.term
|
||||
uploadform.course.data = distribusi.course
|
||||
uploadform.academicyear.data = distribusi.year
|
||||
uploadform.category.data = distribusi.category
|
||||
uploadform.year.data = distribusi.year
|
||||
uploadform.tags.data = distribusi.tags
|
||||
return uploadform
|
||||
|
||||
|
@ -3,9 +3,10 @@ from __future__ import with_statement
|
||||
import logging
|
||||
from logging.config import fileConfig
|
||||
|
||||
from alembic import context
|
||||
from flask import current_app
|
||||
|
||||
from alembic import context
|
||||
|
||||
# this is the Alembic Config object, which provides
|
||||
# access to the values within the .ini file in use.
|
||||
config = context.config
|
||||
@ -13,19 +14,17 @@ config = context.config
|
||||
# Interpret the config file for Python logging.
|
||||
# This line sets up loggers basically.
|
||||
fileConfig(config.config_file_name)
|
||||
logger = logging.getLogger("alembic.env")
|
||||
logger = logging.getLogger('alembic.env')
|
||||
|
||||
# add your model's MetaData object here
|
||||
# for 'autogenerate' support
|
||||
# from myapp import mymodel
|
||||
# target_metadata = mymodel.Base.metadata
|
||||
config.set_main_option(
|
||||
"sqlalchemy.url",
|
||||
str(current_app.extensions["migrate"].db.get_engine().url).replace(
|
||||
"%", "%%"
|
||||
),
|
||||
)
|
||||
target_metadata = current_app.extensions["migrate"].db.metadata
|
||||
'sqlalchemy.url',
|
||||
str(current_app.extensions['migrate'].db.get_engine().url).replace(
|
||||
'%', '%%'))
|
||||
target_metadata = current_app.extensions['migrate'].db.metadata
|
||||
|
||||
# other values from the config, defined by the needs of env.py,
|
||||
# can be acquired:
|
||||
@ -66,20 +65,20 @@ def run_migrations_online():
|
||||
# when there are no changes to the schema
|
||||
# reference: http://alembic.zzzcomputing.com/en/latest/cookbook.html
|
||||
def process_revision_directives(context, revision, directives):
|
||||
if getattr(config.cmd_opts, "autogenerate", False):
|
||||
if getattr(config.cmd_opts, 'autogenerate', False):
|
||||
script = directives[0]
|
||||
if script.upgrade_ops.is_empty():
|
||||
directives[:] = []
|
||||
logger.info("No changes in schema detected.")
|
||||
logger.info('No changes in schema detected.')
|
||||
|
||||
connectable = current_app.extensions["migrate"].db.get_engine()
|
||||
connectable = current_app.extensions['migrate'].db.get_engine()
|
||||
|
||||
with connectable.connect() as connection:
|
||||
context.configure(
|
||||
connection=connection,
|
||||
target_metadata=target_metadata,
|
||||
process_revision_directives=process_revision_directives,
|
||||
**current_app.extensions["migrate"].configure_args,
|
||||
**current_app.extensions['migrate'].configure_args
|
||||
)
|
||||
|
||||
with context.begin_transaction():
|
||||
|
@ -52,7 +52,7 @@ def index():
|
||||
singledistribusi = {
|
||||
"username": user.username,
|
||||
"publictheme": distribusi.publictheme,
|
||||
"category": distribusi.term,
|
||||
"category": distribusi.category,
|
||||
"year": distribusi.year,
|
||||
"tags": distribusi.tags.split(","),
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Dropdown Button */
|
||||
/* for sorting on Academicyear, Term, Course
|
||||
/* for sorting on year and category
|
||||
*/
|
||||
button {
|
||||
background-color: #E0B0FF;
|
||||
|
@ -4,7 +4,7 @@
|
||||
<p><a href="/editor">Go to CSS editor</a></p>
|
||||
{% else %}
|
||||
<p>
|
||||
You need to upload your files first before you can a css theme
|
||||
You need to upload your files first before you can select a css theme
|
||||
for your files.
|
||||
</p>
|
||||
<p><a href="#upload">Go to Step 1</a></p>
|
||||
|
@ -16,7 +16,7 @@
|
||||
</fieldset>
|
||||
{% else %}
|
||||
<p>
|
||||
You need to upload your files first before you can a css theme
|
||||
You need to upload your files first before you can select a css theme
|
||||
for your files.
|
||||
</p>
|
||||
<a href="#upload">Go to Step 1</a>
|
||||
@ -35,7 +35,7 @@
|
||||
</fieldset>
|
||||
{% else %}
|
||||
<p>
|
||||
You need to upload your files first before you can a css theme
|
||||
You need to upload your files first before you can select a css theme
|
||||
for your files.
|
||||
</p>
|
||||
<a href="#upload">Go to Step 1</a>
|
||||
|
@ -11,28 +11,19 @@
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
<fieldset class="required">
|
||||
{{ uploadform.academicyear.label }}
|
||||
{{ uploadform.year.label }}
|
||||
<div class="selector-style">
|
||||
{{ uploadform.academicyear }}
|
||||
{% for message in uploadform.academicyear.errors %}
|
||||
{{ uploadform.year }}
|
||||
{% for message in uploadform.year.errors %}
|
||||
<div class="error">{{ message }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="required">
|
||||
{{ uploadform.term.label }}
|
||||
{{ uploadform.category.label }}
|
||||
<div class="selector-style">
|
||||
{{ uploadform.term }}
|
||||
{% for message in uploadform.term.errors %}
|
||||
<div class="error">{{ message }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="required">
|
||||
{{ uploadform.course.label }}
|
||||
<div class="selector-style">
|
||||
{{ uploadform.course }}
|
||||
{% for message in uploadform.course.errors %}
|
||||
{{ uploadform.category }}
|
||||
{% for message in uploadform.category.errors %}
|
||||
<div class="error">{{ message }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user