forked from django-wiki/django-wiki
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from edx/awais786/BOM-68
Awais786/bom 68
- Loading branch information
Showing
82 changed files
with
354 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
from __future__ import absolute_import | ||
|
||
from django.contrib import admin | ||
|
||
from django_notify import models | ||
|
||
admin.site.register(models.NotificationType) | ||
admin.site.register(models.Notification) | ||
admin.site.register(models.Settings) | ||
admin.site.register(models.Subscription) | ||
admin.site.register(models.Subscription) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
from __future__ import absolute_import | ||
|
||
from django.conf import settings as django_settings | ||
|
||
_ = lambda x: x | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# This file describes this Open edX repo, as described in OEP-2: | ||
# https://open-edx-proposals.readthedocs.io/en/latest/oep-0002-bp-repo-metadata.html#specification: | ||
|
||
nick: django-wiki | ||
supporting_teams: | ||
- platform-core | ||
tags: | ||
- core | ||
- library | ||
oeps: | ||
oep-7: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import absolute_import | ||
|
||
import os | ||
from setuptools import setup, find_packages | ||
|
||
from setuptools import find_packages, setup | ||
from six.moves import range | ||
|
||
|
||
def read(fname): | ||
|
@@ -17,12 +21,15 @@ def read(fname): | |
def build_media_pattern(base_folder, file_extension): | ||
return ["%s/%s*.%s" % (base_folder, "*/"*x, file_extension) for x in range(10)] | ||
|
||
template_patterns = ( build_media_pattern("templates", "html") + | ||
build_media_pattern("static", "js") + | ||
build_media_pattern("static", "css") + | ||
build_media_pattern("static", "png") + | ||
build_media_pattern("static", "jpeg") + | ||
build_media_pattern("static", "gif")) | ||
|
||
template_patterns = ( | ||
build_media_pattern("templates", "html") + | ||
build_media_pattern("static", "js") + | ||
build_media_pattern("static", "css") + | ||
build_media_pattern("static", "png") + | ||
build_media_pattern("static", "jpeg") + | ||
build_media_pattern("static", "gif") | ||
) | ||
|
||
packages = find_packages() | ||
|
||
|
@@ -33,7 +40,7 @@ def build_media_pattern(base_folder, file_extension): | |
|
||
setup( | ||
name = "django-wiki", | ||
version="0.0.20", | ||
version="0.0.22", | ||
author="Benjamin Bach", | ||
author_email="[email protected]", | ||
description=("A wiki system written for the Django framework."), | ||
|
@@ -55,7 +62,10 @@ def build_media_pattern(base_folder, file_extension): | |
'Framework :: Django', | ||
'Intended Audience :: Developers', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.6', | ||
'Topic :: Internet :: WWW/HTTP :: Dynamic Content', | ||
'Topic :: Software Development', | ||
'Topic :: Software Development :: Libraries :: Application Frameworks', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
#!/usr/bin/env python | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import sys | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
framework. | ||
""" | ||
from __future__ import absolute_import | ||
import os | ||
import sys | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
#!virtualenv/bin/python | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import sys | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
from __future__ import absolute_import | ||
|
||
import difflib | ||
|
||
|
||
def simple_merge(txt1, txt2): | ||
"""Merges two texts""" | ||
differ = difflib.Differ(charjunk=difflib.IS_CHARACTER_JUNK) | ||
diff = differ.compare(txt1.splitlines(1), txt2.splitlines(1)) | ||
|
||
content = "".join([l[2:] for l in diff]) | ||
|
||
return content | ||
return content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
from __future__ import absolute_import | ||
|
||
from markdown.extensions import Extension | ||
|
||
from .processors import AnchorTagProcessor | ||
from wiki.core.processors import AnchorTagProcessor | ||
|
||
|
||
class AnchorTagExtension(Extension): | ||
""" | ||
Custom extension to register anchor tag processor with Markdown. | ||
""" | ||
|
||
def extendMarkdown(self, md, md_globals): | ||
md.treeprocessors.add('AnchorTagProcessor', AnchorTagProcessor(md), '>inline') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.