Giter Site home page Giter Site logo

djiki's People

Contributors

cfra avatar emesik avatar fenikso avatar markkkun avatar perchouli avatar spookylukey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

djiki's Issues

i18n

It should be possible to use djiki for multi-language content. Two things have to be taken under consideration:

  • storage: Different language versions can be stored either in the same database (and the same table), appearing under the same site address. On the contrary, they might be spread among separate, independent servers.
  • connection: There must be some way to define interwiki links and resolve them into proper URLs, depending on the storage solution.

The roadmap:

  1. Add language field to the Page model and make (title, language) unique instead of title itself.
  2. Add DJIKI_LANGUAGE setting with fallback to automatically recognize the language used on site, within the current request context.
  3. Add interwiki syntax to the Creole markup and implement a set of basic URL resolvers (perhaps a part of the parser itself).
  4. Think how to handle the images

Tests

Write tests that check behavior of different settings.py

recovery or support for '/' in target-page titles

Currently, putting a slash in an intended page title (like say [[about/team]]) results in a nasty TemplateSyntaxError from a 'NoReverseMatch' condition... which can't easily be recovered, as the page now can't be displayed and backing up to the prior edit page doesn't seem to allow replacing the bad content with a new submission.

A way to recover would be nice -- perhaps dumping back to edit on errors? -- but also allowing titles with '/' is beneficial for many uses, so perhaps the functionality now indicated by a trailing /path could instead be moved to a ?query-string or alternate /path-prefix/ in the default urls-mapping.

"title": CharField cannot have a "max_length" greater than 255 when using "unique=True"

Got the error during installation on mysql 5.1.67.

diff -rupN djiki.orig/models.py djiki/models.py
--- djiki.orig/models.py    2014-02-11 14:49:22.198695089 +0000
+++ djiki/models.py 2014-02-11 14:58:16.615661160 +0000
@@ -32,7 +32,7 @@ class Revision(models.Model):


 class Page(models.Model, Versioned):
-   title = models.CharField(_("Title"), max_length=256, unique=True)
+   title = models.CharField(_("Title"), max_length=255, unique=True)

    class Meta:
        ordering = ('title',)

from django.utils.importlib import import_module

django.utils.importlib is a compatibility library for when Python 2.6 was still supported. It has been obsolete since Django 1.7, which dropped support for Python 2.6, and is removed in 1.9 per the deprecation cycle.

Use Python's import_module function instead:

from importlib import import_module

Fix your code, please

Split out markup-agnostic package

Having the creole markup not developed by original authors for quite long time, we might split the package into:

djiki (no markup backend)
djiki[creole]
djiki[mediawiki] (once #6 is finished)

PEP8 compliance - spaces?

Any chance of converting the Python code to be PEP8 compliant and use spaces not tabs?

http://www.python.org/dev/peps/pep-0008/#tabs-or-spaces

Spaces are the preferred indentation method.

Tabs should be used solely to remain consistent with code that is 
already indented with tabs.

This is actually one of the biggest reasons I wouldn't contribute to this project. I would have to configure my editor to use tabs for this project, when it uses spaces for every single other Python project that I work on. I could write something that detects tabs in existing modules, but for new files in a project it's not possible.

The arguments about the relative merits of spaces/tabs aren't relevant here. The advantages of everyone doing the same thing outweigh other considerations, and PEP8 is the de-facto standard for Python projects. When I see a Python project with tabs instead of spaces, which are pretty few and far between, especially in the Django ecosystem, I tend to assume the author is not a team player, and it discourages me from contributing at all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.