Pārlūkot izejas kodu

Moar unicode fixes

pull/2/head
Noah Petherbridge pirms 7 gadiem
vecāks
revīzija
21dbede734
  1. 1
      rophako/app.py
  2. 1
      rophako/jsondb.py
  3. 1
      rophako/log.py
  4. 1
      rophako/model/blog.py
  5. 1
      rophako/model/comment.py
  6. 1
      rophako/model/emoticons.py
  7. 1
      rophako/model/photo.py
  8. 1
      rophako/model/tracking.py
  9. 1
      rophako/model/user.py
  10. 1
      rophako/model/wiki.py
  11. 1
      rophako/modules/account/__init__.py
  12. 1
      rophako/modules/admin/__init__.py
  13. 1
      rophako/modules/blog/__init__.py
  14. 1
      rophako/modules/contact/__init__.py
  15. 1
      rophako/modules/emoticons/__init__.py
  16. 1
      rophako/modules/photo/__init__.py
  17. 1
      rophako/modules/tracking/__init__.py
  18. 1
      rophako/modules/wiki/__init__.py
  19. 1
      rophako/plugin.py
  20. 1
      rophako/settings.py
  21. 12
      rophako/utils.py
  22. 9
      rophako/www/layout.html
  23. 3
      scripts/orphaned-photos.py
  24. 3
      scripts/siikir-blog-migrate.py

1
rophako/app.py

@ -1,4 +1,5 @@
#!/usr/bin/env python
from __future__ import unicode_literals
"""Flask app for Rophako."""

1
rophako/jsondb.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""JSON flat file database system."""

1
rophako/log.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Debug and logging functions."""

1
rophako/model/blog.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Blog models."""

1
rophako/model/comment.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Commenting models."""

1
rophako/model/emoticons.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Emoticon models."""

1
rophako/model/photo.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Photo album models."""

1
rophako/model/tracking.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Visitor tracking models."""

1
rophako/model/user.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""User account models."""

1
rophako/model/wiki.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Wiki models."""

1
rophako/modules/account/__init__.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Endpoints for user login and out."""

1
rophako/modules/admin/__init__.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Endpoints for admin functions."""

1
rophako/modules/blog/__init__.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Endpoints for the web blog."""

1
rophako/modules/contact/__init__.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Endpoints for contacting the site owner."""

1
rophako/modules/emoticons/__init__.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Endpoints for the commenting subsystem."""

1
rophako/modules/photo/__init__.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Endpoints for the photo albums."""

1
rophako/modules/tracking/__init__.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Endpoints for visitor tracking functions."""

1
rophako/modules/wiki/__init__.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Endpoints for the wiki."""

1
rophako/plugin.py

@ -1,4 +1,5 @@
#!/usr/bin/env python
from __future__ import unicode_literals
"""Dynamic CMS plugin loader."""

1
rophako/settings.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import datetime

12
rophako/utils.py

@ -14,6 +14,7 @@ import markdown
import json
import urlparse
import traceback
import socket
from rophako.log import logger
from rophako.settings import Config
@ -190,10 +191,13 @@ def send_email(to, subject, message, sender=None, reply_to=None):
headers.append("Subject: {}".format(subject))
# Prepare the mail for transport.
server = smtplib.SMTP(Config.mail.server, Config.mail.port)
msg = "\n".join(headers) + "\n\n" + message
server.sendmail(sender, email, msg)
server.quit()
try:
server = smtplib.SMTP(Config.mail.server, Config.mail.port)
msg = "\n".join(headers) + "\n\n" + message
server.sendmail(sender, email, msg)
server.quit()
except socket.error:
pass
def handle_exception(error):

9
rophako/www/layout.html

@ -54,15 +54,6 @@
{% block content %}{% endblock %}
<hr>
<p class="right">
<strong>Visitor Information:</strong><br>
Unique Visitors: {{ tracking["unique_today"] }} today/{{ tracking["unique_total"] }} total<br>
Page Hits: {{ tracking["hits_today"] }} today/{{ tracking["hits_total"] }} total<br>
<a href="{{ url_for('tracking.visitors') }}">Visitor Details</a> |
<a href="{{ url_for('tracking.referrers') }}">Referring URLs</a>
</p>
<footer>
<div>
&copy; 2014 Noah Petherbridge. Web design released along with the Rophako CMS

3
scripts/orphaned-photos.py

@ -1,4 +1,5 @@
#!/usr/bin/env python
from __future__ import unicode_literals
"""Locate any orphaned photos.
@ -34,4 +35,4 @@ def main():
print "Orphan:", fname
if __name__ == "__main__":
main()
main()

3
scripts/siikir-blog-migrate.py

@ -1,4 +1,5 @@
#!/usr/bin/env python
from __future__ import unicode_literals
"""Migrate blog database files from a PerlSiikir site to Rophako.
@ -117,4 +118,4 @@ def json_get(document):
if __name__ == "__main__":
main()
main()

Notiek ielāde…
Atcelt
Saglabāt