diff --git a/src/postorius/doc/_build/doctrees/environment.pickle b/src/postorius/doc/_build/doctrees/environment.pickle index 57bdd05..314683a 100644 --- a/src/postorius/doc/_build/doctrees/environment.pickle +++ b/src/postorius/doc/_build/doctrees/environment.pickle Binary files differ diff --git a/src/postorius/doc/_build/doctrees/index.doctree b/src/postorius/doc/_build/doctrees/index.doctree index df97384..080f929 100644 --- a/src/postorius/doc/_build/doctrees/index.doctree +++ b/src/postorius/doc/_build/doctrees/index.doctree Binary files differ diff --git a/src/postorius/doc/_build/doctrees/news.doctree b/src/postorius/doc/_build/doctrees/news.doctree index 09ed2fc..e0f6fda 100644 --- a/src/postorius/doc/_build/doctrees/news.doctree +++ b/src/postorius/doc/_build/doctrees/news.doctree Binary files differ diff --git a/src/postorius/doc/_build/doctrees/setup.doctree b/src/postorius/doc/_build/doctrees/setup.doctree index 51aa299..625fc17 100644 --- a/src/postorius/doc/_build/doctrees/setup.doctree +++ b/src/postorius/doc/_build/doctrees/setup.doctree Binary files differ diff --git a/src/postorius/doc/_build/doctrees/using.doctree b/src/postorius/doc/_build/doctrees/using.doctree index 74cc4fa..d720811 100644 --- a/src/postorius/doc/_build/doctrees/using.doctree +++ b/src/postorius/doc/_build/doctrees/using.doctree Binary files differ diff --git a/src/postorius/doc/_build/html/.buildinfo b/src/postorius/doc/_build/html/.buildinfo index e035e7c..0636256 100644 --- a/src/postorius/doc/_build/html/.buildinfo +++ b/src/postorius/doc/_build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: cca8bccba816f1a79080c55d505c09f8 +config: b7c499bf02394c05c2168ae495bae526 tags: fbb0d17656682115ca4d033fb2f83ba1 diff --git a/src/postorius/doc/_build/html/_sources/index.txt b/src/postorius/doc/_build/html/_sources/index.txt index 8b99081..b6027ff 100644 --- a/src/postorius/doc/_build/html/_sources/index.txt +++ b/src/postorius/doc/_build/html/_sources/index.txt @@ -1,10 +1,5 @@ -.. mailman_django documentation master file, created by - sphinx-quickstart on Wed Aug 17 15:43:10 2011. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to mailman_django's documentation! -========================================== +Postorius - The New Mailman Web UI +================================== Contents: diff --git a/src/postorius/doc/_build/html/_sources/news.txt b/src/postorius/doc/_build/html/_sources/news.txt index 81a30f2..1a1c336 100644 --- a/src/postorius/doc/_build/html/_sources/news.txt +++ b/src/postorius/doc/_build/html/_sources/news.txt @@ -20,6 +20,15 @@ along with postorius. If not, see . +1.0 alpha 2 +=========== +(2012-XX-XX) + +* dev setup fix for Django 1.4 contributed by Rohan Jain +* missing csrf tokens in templates contributed by Richard Wackerbarth (LP: 996658) +* moderation: fixed typo in success message call + + 1.0 alpha 1 -- "Space Farm" =========================== (2012-03-23) diff --git a/src/postorius/doc/_build/html/_sources/setup.txt b/src/postorius/doc/_build/html/_sources/setup.txt index cd5d54e..63257c4 100644 --- a/src/postorius/doc/_build/html/_sources/setup.txt +++ b/src/postorius/doc/_build/html/_sources/setup.txt @@ -1,202 +1,21 @@ Installation ============ - .. warning:: - This installation guide is outdated and needs to be updated. - Please use the following resources instead: - - To install GNU Mailman follow the instructions in the documentation: - http://packages.python.org/mailman/ - - A description how to run postorius on Django's dev server, can be found in - the GNU Mailman wiki: - http://wiki.list.org/display/DEV/A+5+minute+guide+to+get+the+Mailman+web+UI+running - - You can also find a guide how to run postorius using the Apache web server - on the Mailman wiki: - http://wiki.list.org/display/DEV/How+to+get+Postorius+running+on+Apache+and+mod_wsgi - -Mailman3 - a7 -------------- - -* Check Dependecys - .. note:: - This might differ on different systems - I was testing Ubuntu 11.04 natty and needed to install Postfix before running the installation. -* Download or branch Mailman3a7 from http://launchpad.net/mailman/3.0/3.0.0a7/+download/mailman-3.0.0a7.tar.gz and unpack it. -* Change into the unpacked DIR which might be named "mailman-3.0.0a7" - .. note:: - Please be aware that the following steps only work if you're really in that DIR. If you consider adding a subfolder name to the commands those woun't work ! -* Run the Installation from a Shell (not Python) - - .. code-block:: bash - - $ python bootstrap.py - $ bin/buildout - -* Vertify that everything was setup correclty and your branch fullfills the version requirements by running it's own test module - - .. code-block:: bash - - $ bin/test - -* Now you're able to run mailman using - - .. code-block:: bash - - $ bin/mailman - -Mailman Client / REST Api -------------------------- - -Next thing you need to do is installing the Plugin used for communication with non-mailman-code parts like our WebUI. Within the Client Branch we've put both, Classes to access the Core which are run as a Plugin and some Python Bindings. -The Python Bindings were used later on within our Django Application to access the Server. Failing to install the Client would result in an offline version of WebUI - -Once again start by branching the code which is on Launchpad - - .. code-block:: bash - - $ bzr branch lp:mailman.client - .. note:: - We've successfully tested our functionality with Revision 16 - In case the Client gets updated which it surely will in future we can't guarentee that it is compatible anymore. + This installation guide covers Postorius, the web user interface for + GNU Mailman 3. To install GNU Mailman follow the instructions in the documentation: + http://packages.python.org/mailman/ + -As you only want to run the Client and not modify it's code you're fine with running the install command from within the directory. At the moment this requires Sudo Priveledges as files will copied to the Python Site-Packages Directory which is available to all users. +Installing for Development +-------------------------- - .. code-block:: bash - - $ sudo python setup.py install +.. warning:: + You should use the development server only locally. While it's possible to + make the dev server available publicly, you should never do that in a + production environment. -.. note:: - If you want to change parts of the Client you can use the development option which will create a Symlink instead of a Hardcopy of all files: - .. code-block:: bash - - $ sudo python setup.py develop +Apache and mod_Wsgi +------------------- -All changes will apply once you restart Mailman itself. - -Django 1.3 ----------- -During our development we started a Django Site based on the 1.2 Version which is included into Ubuntu's repositorys. This made the installation easy but we ended up having some points which would get a much better code when using some elements introducing in 1.3. -As Mailman is supposed to be long-time stable - or however you call it - we decided that we should stick to the latest stable version right away. For this reason you're required to install Django 1.3+ which is descriped on their Website. (https://www.djangoproject.com/download/) - -.. note:: - Please be Aware that it's not recommended to run both 1.2 and 1.3 at the same time - -In Django you've got 3 different levels of data. -- Django Installation Files -- Django Site -- Django Apps -usually you don't see the Installation as it's hidden somewhere within the System and the Apps are simply included into The Site Directory. -As we wanted to have the possibility to include the App into any Django Site which might already exist we decided to keep Site and App seperated. - -During GSoC we've used different branches for this: -- lp:mailmanwebgsoc2011 -- lp:mailmanwebgsoc2011/django-site-0.1 - -Django Site Installation ------------------------- - -We've created this branch for quick development - everyone is free to use his own Django site, but this one already includes a couple of modifications we've made that will allow running the Development Server just a few seconds after Branching both Site and App. - -As far as I know at the moment we've made the following alignments: (All of these are in the settings.py file of the Django Site) - - REST_SERVER = 'localhost:8001' - API_USER = 'restadmin' - API_PASS = 'restpass' - - .. note:: - These are the default values used by the Mailman Client we've installed earlier. Feel free to modify the password and username if you need to. - -MAILMAN_TEST_BINDIR = '/home/benste/Projects/Gsoc_mailman/mailman-3.0.0a7/bin' -#/home/florian/Development/mailman/bin' - - .. note:: Running the test modules requires to launch a special version of mailman with it's own testing DB otherwise you'd destroy you're sites content during testing. This Path needs to point to YOUR own installation of mailman. - -MAILMAN_THEME = "default" - - .. note:: - We decided to allow simple Appearance Modifications, to use a custom CSS you could simply add a Directory within the media directory of the app and Link it's name here. All HTML Pages will use the Styles from the Directory mentioned in here - -PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) -MEDIA_ROOT = os.path.join(os.path.split(PROJECT_PATH)[0], "mailman_django/media/mailman_django/") - .. note:: - Absolute path to the directory that holds media. - Example: "/home/media/media.lawrence.com/" - -MEDIA_URL = '/mailman_media/' - - .. note:: - URL that handles the media served from MEDIA_ROOT. Make sure to use a trailing slash if there is a path component (optional in other cases).Examples: "http://media.lawrence.com", "http://example.com/media/" - -AUTHENTICATION_BACKENDS = ( - 'mailman_django.auth.restbackend.RESTBackend', - 'django.contrib.auth.backends.ModelBackend' - ) - - .. note:: - This creates a connection in between Djangos Login and Permission Decorators which we use for authentification and a custom Backend which we created in Preparation to work together with the REST API or an upcoming Middleware. - You need to keep the Django one for testing fallback. - -TEMPLATE_CONTEXT_PROCESSORS=( - "django.contrib.auth.context_processors.auth", - "django.core.context_processors.debug", - "django.core.context_processors.i18n", - "django.core.context_processors.media", - "django.core.context_processors.csrf", - "django.contrib.messages.context_processors.messages", - "mailman_django.context_processors.lists_of_domain", - "mailman_django.context_processors.render_MAILMAN_THEME", - "mailman_django.context_processors.extend_ajax" - - .. note:: - We're using Context Processors to easily render value which we need in nearly every view. - -ROOT_URLCONF = 'mailman_django.urls' - - .. note:: - This is where our URL Config is - if you run your own site with other Apps as well you might want to adjust this to your urls.py which includes our file. - -TEMPLATE_DIRS = ( - os.path.join(PROJECT_PATH, "mailman_django/templates"), - - .. note:: - Adds our own Templates - -INSTALLED_APPS = ( - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.sites', - 'django.contrib.admin', - 'mailman_django', - - .. note:: - Makes sure that Django knows about our directory as an App and creates needed Tables () when running - - .. code-block:: bash - - $ python manage.py syncdb - -Now that you know about all these you might start the development server. As usual in Django this is done by running - - .. code-block:: bash - - $ python manage.py runserver - -within the Django Site Directory - as usual the default address is localhost:8000 -Of course it will only be able to start once our app is in place as well. - -Django Application ------------------- -First get the files, and make sure you paste them into your Project directory and adjust it's name to the appropriate configuration you've made earlier in the Django Site. Remeber our default is mailman_django - - .. code-block:: bash - - $ bzr branch lp:mailmanwebgsoc2011 - -.. note:: - We've tested Revision 172 - -.. note:: - We're planning to ease up installation by creating an egg diff --git a/src/postorius/doc/_build/html/_static/ajax-loader.gif b/src/postorius/doc/_build/html/_static/ajax-loader.gif new file mode 100644 index 0000000..61faf8c --- /dev/null +++ b/src/postorius/doc/_build/html/_static/ajax-loader.gif Binary files differ diff --git a/src/postorius/doc/_build/html/_static/basic.css b/src/postorius/doc/_build/html/_static/basic.css index 32630d5..f0379f3 100644 --- a/src/postorius/doc/_build/html/_static/basic.css +++ b/src/postorius/doc/_build/html/_static/basic.css @@ -79,6 +79,14 @@ font-size: 1em; } +div.sphinxsidebar input[type="text"] { + width: 170px; +} + +div.sphinxsidebar input[type="submit"] { + width: 30px; +} + img { border: 0; } @@ -236,7 +244,6 @@ } .align-center { - clear: both; text-align: center; } @@ -440,6 +447,11 @@ font-style: oblique; } +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + /* -- code displays --------------------------------------------------------- */ pre { @@ -525,4 +537,4 @@ #top-link { display: none; } -} +} \ No newline at end of file diff --git a/src/postorius/doc/_build/html/_static/comment-bright.png b/src/postorius/doc/_build/html/_static/comment-bright.png new file mode 100644 index 0000000..551517b --- /dev/null +++ b/src/postorius/doc/_build/html/_static/comment-bright.png Binary files differ diff --git a/src/postorius/doc/_build/html/_static/comment-close.png b/src/postorius/doc/_build/html/_static/comment-close.png new file mode 100644 index 0000000..09b54be --- /dev/null +++ b/src/postorius/doc/_build/html/_static/comment-close.png Binary files differ diff --git a/src/postorius/doc/_build/html/_static/comment.png b/src/postorius/doc/_build/html/_static/comment.png new file mode 100644 index 0000000..92feb52 --- /dev/null +++ b/src/postorius/doc/_build/html/_static/comment.png Binary files differ diff --git a/src/postorius/doc/_build/html/_static/doctools.js b/src/postorius/doc/_build/html/_static/doctools.js index 8b9bd2c..d4619fd 100644 --- a/src/postorius/doc/_build/html/_static/doctools.js +++ b/src/postorius/doc/_build/html/_static/doctools.js @@ -2,7 +2,7 @@ * doctools.js * ~~~~~~~~~~~ * - * Sphinx JavaScript utilties for all documentation. + * Sphinx JavaScript utilities for all documentation. * * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. @@ -185,9 +185,9 @@ body.highlightText(this.toLowerCase(), 'highlighted'); }); }, 10); - $('') - .appendTo($('.sidebar .this-page-menu')); + $('') + .appendTo($('#searchbox')); } }, @@ -213,7 +213,7 @@ * helper function to hide the search marks again */ hideSearchWords : function() { - $('.sidebar .this-page-menu li.highlight-link').fadeOut(300); + $('#searchbox .highlight-link').fadeOut(300); $('span.highlighted').removeClass('highlighted'); }, diff --git a/src/postorius/doc/_build/html/_static/down-pressed.png b/src/postorius/doc/_build/html/_static/down-pressed.png new file mode 100644 index 0000000..6f7ad78 --- /dev/null +++ b/src/postorius/doc/_build/html/_static/down-pressed.png Binary files differ diff --git a/src/postorius/doc/_build/html/_static/down.png b/src/postorius/doc/_build/html/_static/down.png new file mode 100644 index 0000000..3003a88 --- /dev/null +++ b/src/postorius/doc/_build/html/_static/down.png Binary files differ diff --git a/src/postorius/doc/_build/html/_static/searchtools.js b/src/postorius/doc/_build/html/_static/searchtools.js index dae92b5..663be4c 100644 --- a/src/postorius/doc/_build/html/_static/searchtools.js +++ b/src/postorius/doc/_build/html/_static/searchtools.js @@ -1,6 +1,6 @@ /* - * searchtools.js - * ~~~~~~~~~~~~~~ + * searchtools.js_t + * ~~~~~~~~~~~~~~~~ * * Sphinx JavaScript utilties for the full-text search. * @@ -36,10 +36,11 @@ return rv; } + /** * Porter Stemmer */ -var PorterStemmer = function() { +var Stemmer = function() { var step2list = { ational: 'ate', @@ -300,20 +301,20 @@ }, query : function(query) { - var stopwords = ['and', 'then', 'into', 'it', 'as', 'are', 'in', - 'if', 'for', 'no', 'there', 'their', 'was', 'is', - 'be', 'to', 'that', 'but', 'they', 'not', 'such', - 'with', 'by', 'a', 'on', 'these', 'of', 'will', - 'this', 'near', 'the', 'or', 'at']; + var stopwords = ["and","then","into","it","as","are","in","if","for","no","there","their","was","is","be","to","that","but","they","not","such","with","by","a","on","these","of","will","this","near","the","or","at"]; - // stem the searchterms and add them to the correct list - var stemmer = new PorterStemmer(); + // Stem the searchterms and add them to the correct list + var stemmer = new Stemmer(); var searchterms = []; var excluded = []; var hlterms = []; var tmp = query.split(/\s+/); - var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null; + var objectterms = []; for (var i = 0; i < tmp.length; i++) { + if (tmp[i] != "") { + objectterms.push(tmp[i].toLowerCase()); + } + if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) || tmp[i] == "") { // skip this "word" @@ -344,9 +345,6 @@ var filenames = this._index.filenames; var titles = this._index.titles; var terms = this._index.terms; - var objects = this._index.objects; - var objtypes = this._index.objtypes; - var objnames = this._index.objnames; var fileMap = {}; var files = null; // different result priorities @@ -357,40 +355,19 @@ $('#search-progress').empty(); // lookup as object - if (object != null) { - for (var prefix in objects) { - for (var name in objects[prefix]) { - var fullname = (prefix ? prefix + '.' : '') + name; - if (fullname.toLowerCase().indexOf(object) > -1) { - match = objects[prefix][name]; - descr = objnames[match[1]] + _(', in ') + titles[match[0]]; - // XXX the generated anchors are not generally correct - // XXX there may be custom prefixes - result = [filenames[match[0]], fullname, '#'+fullname, descr]; - switch (match[2]) { - case 1: objectResults.push(result); break; - case 0: importantResults.push(result); break; - case 2: unimportantResults.push(result); break; - } - } - } - } + for (var i = 0; i < objectterms.length; i++) { + var others = [].concat(objectterms.slice(0,i), + objectterms.slice(i+1, objectterms.length)) + var results = this.performObjectSearch(objectterms[i], others); + // Assume first word is most likely to be the object, + // other words more likely to be in description. + // Therefore put matches for earlier words first. + // (Results are eventually used in reverse order). + objectResults = results[0].concat(objectResults); + importantResults = results[1].concat(importantResults); + unimportantResults = results[2].concat(unimportantResults); } - // sort results descending - objectResults.sort(function(a, b) { - return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); - }); - - importantResults.sort(function(a, b) { - return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); - }); - - unimportantResults.sort(function(a, b) { - return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); - }); - - // perform the search on the required terms for (var i = 0; i < searchterms.length; i++) { var word = searchterms[i]; @@ -489,7 +466,7 @@ listItem.slideDown(5, function() { displayNextItem(); }); - }); + }, "text"); } else { // no source available, just display title Search.output.append(listItem); @@ -510,9 +487,74 @@ } } displayNextItem(); + }, + + performObjectSearch : function(object, otherterms) { + var filenames = this._index.filenames; + var objects = this._index.objects; + var objnames = this._index.objnames; + var titles = this._index.titles; + + var importantResults = []; + var objectResults = []; + var unimportantResults = []; + + for (var prefix in objects) { + for (var name in objects[prefix]) { + var fullname = (prefix ? prefix + '.' : '') + name; + if (fullname.toLowerCase().indexOf(object) > -1) { + var match = objects[prefix][name]; + var objname = objnames[match[1]][2]; + var title = titles[match[0]]; + // If more than one term searched for, we require other words to be + // found in the name/title/description + if (otherterms.length > 0) { + var haystack = (prefix + ' ' + name + ' ' + + objname + ' ' + title).toLowerCase(); + var allfound = true; + for (var i = 0; i < otherterms.length; i++) { + if (haystack.indexOf(otherterms[i]) == -1) { + allfound = false; + break; + } + } + if (!allfound) { + continue; + } + } + var descr = objname + _(', in ') + title; + anchor = match[3]; + if (anchor == '') + anchor = fullname; + else if (anchor == '-') + anchor = objnames[match[1]][1] + '-' + fullname; + result = [filenames[match[0]], fullname, '#'+anchor, descr]; + switch (match[2]) { + case 1: objectResults.push(result); break; + case 0: importantResults.push(result); break; + case 2: unimportantResults.push(result); break; + } + } + } + } + + // sort results descending + objectResults.sort(function(a, b) { + return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); + }); + + importantResults.sort(function(a, b) { + return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); + }); + + unimportantResults.sort(function(a, b) { + return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0); + }); + + return [importantResults, objectResults, unimportantResults] } } $(document).ready(function() { Search.init(); -}); +}); \ No newline at end of file diff --git a/src/postorius/doc/_build/html/_static/sidebar.js b/src/postorius/doc/_build/html/_static/sidebar.js index e9ef491..a45e192 100644 --- a/src/postorius/doc/_build/html/_static/sidebar.js +++ b/src/postorius/doc/_build/html/_static/sidebar.js @@ -29,6 +29,9 @@ var sidebar = $('.sphinxsidebar'); var sidebarwrapper = $('.sphinxsidebarwrapper'); + // for some reason, the document has no sidebar; do not run into errors + if (!sidebar.length) return; + // original margin-left of the bodywrapper and width of the sidebar // with the sidebar expanded var bw_margin_expanded = bodywrapper.css('margin-left'); diff --git a/src/postorius/doc/_build/html/_static/underscore.js b/src/postorius/doc/_build/html/_static/underscore.js index 9146e08..5d89914 100644 --- a/src/postorius/doc/_build/html/_static/underscore.js +++ b/src/postorius/doc/_build/html/_static/underscore.js @@ -1,3 +1,10 @@ +// Underscore.js 0.5.5 +// (c) 2009 Jeremy Ashkenas, DocumentCloud Inc. +// Underscore is freely distributable under the terms of the MIT license. +// Portions of Underscore are inspired by or borrowed from Prototype.js, +// Oliver Steele's Functional, and John Resig's Micro-Templating. +// For all details and documentation: +// http://documentcloud.github.com/underscore/ (function(){var j=this,n=j._,i=function(a){this._wrapped=a},m=typeof StopIteration!=="undefined"?StopIteration:"__break__",b=j._=function(a){return new i(a)};if(typeof exports!=="undefined")exports._=b;var k=Array.prototype.slice,o=Array.prototype.unshift,p=Object.prototype.toString,q=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;b.VERSION="0.5.5";b.each=function(a,c,d){try{if(a.forEach)a.forEach(c,d);else if(b.isArray(a)||b.isArguments(a))for(var e=0,f=a.length;e 0) { + var start = document.cookie.indexOf('sortBy='); + if (start != -1) { + start = start + 7; + var end = document.cookie.indexOf(";", start); + if (end == -1) { + end = document.cookie.length; + by = unescape(document.cookie.substring(start, end)); + } + } + } + setComparator(); + } + + /** + * Show a comment div. + */ + function show(id) { + $('#ao' + id).hide(); + $('#ah' + id).show(); + var context = $.extend({id: id}, opts); + var popup = $(renderTemplate(popupTemplate, context)).hide(); + popup.find('textarea[name="proposal"]').hide(); + popup.find('a.by' + by).addClass('sel'); + var form = popup.find('#cf' + id); + form.submit(function(event) { + event.preventDefault(); + addComment(form); + }); + $('#s' + id).after(popup); + popup.slideDown('fast', function() { + getComments(id); + }); + } + + /** + * Hide a comment div. + */ + function hide(id) { + $('#ah' + id).hide(); + $('#ao' + id).show(); + var div = $('#sc' + id); + div.slideUp('fast', function() { + div.remove(); + }); + } + + /** + * Perform an ajax request to get comments for a node + * and insert the comments into the comments tree. + */ + function getComments(id) { + $.ajax({ + type: 'GET', + url: opts.getCommentsURL, + data: {node: id}, + success: function(data, textStatus, request) { + var ul = $('#cl' + id); + var speed = 100; + $('#cf' + id) + .find('textarea[name="proposal"]') + .data('source', data.source); + + if (data.comments.length === 0) { + ul.html('
  • No comments yet.
  • '); + ul.data('empty', true); + } else { + // If there are comments, sort them and put them in the list. + var comments = sortComments(data.comments); + speed = data.comments.length * 100; + appendComments(comments, ul); + ul.data('empty', false); + } + $('#cn' + id).slideUp(speed + 200); + ul.slideDown(speed); + }, + error: function(request, textStatus, error) { + showError('Oops, there was a problem retrieving the comments.'); + }, + dataType: 'json' + }); + } + + /** + * Add a comment via ajax and insert the comment into the comment tree. + */ + function addComment(form) { + var node_id = form.find('input[name="node"]').val(); + var parent_id = form.find('input[name="parent"]').val(); + var text = form.find('textarea[name="comment"]').val(); + var proposal = form.find('textarea[name="proposal"]').val(); + + if (text == '') { + showError('Please enter a comment.'); + return; + } + + // Disable the form that is being submitted. + form.find('textarea,input').attr('disabled', 'disabled'); + + // Send the comment to the server. + $.ajax({ + type: "POST", + url: opts.addCommentURL, + dataType: 'json', + data: { + node: node_id, + parent: parent_id, + text: text, + proposal: proposal + }, + success: function(data, textStatus, error) { + // Reset the form. + if (node_id) { + hideProposeChange(node_id); + } + form.find('textarea') + .val('') + .add(form.find('input')) + .removeAttr('disabled'); + var ul = $('#cl' + (node_id || parent_id)); + if (ul.data('empty')) { + $(ul).empty(); + ul.data('empty', false); + } + insertComment(data.comment); + var ao = $('#ao' + node_id); + ao.find('img').attr({'src': opts.commentBrightImage}); + if (node_id) { + // if this was a "root" comment, remove the commenting box + // (the user can get it back by reopening the comment popup) + $('#ca' + node_id).slideUp(); + } + }, + error: function(request, textStatus, error) { + form.find('textarea,input').removeAttr('disabled'); + showError('Oops, there was a problem adding the comment.'); + } + }); + } + + /** + * Recursively append comments to the main comment list and children + * lists, creating the comment tree. + */ + function appendComments(comments, ul) { + $.each(comments, function() { + var div = createCommentDiv(this); + ul.append($(document.createElement('li')).html(div)); + appendComments(this.children, div.find('ul.comment-children')); + // To avoid stagnating data, don't store the comments children in data. + this.children = null; + div.data('comment', this); + }); + } + + /** + * After adding a new comment, it must be inserted in the correct + * location in the comment tree. + */ + function insertComment(comment) { + var div = createCommentDiv(comment); + + // To avoid stagnating data, don't store the comments children in data. + comment.children = null; + div.data('comment', comment); + + var ul = $('#cl' + (comment.node || comment.parent)); + var siblings = getChildren(ul); + + var li = $(document.createElement('li')); + li.hide(); + + // Determine where in the parents children list to insert this comment. + for(i=0; i < siblings.length; i++) { + if (comp(comment, siblings[i]) <= 0) { + $('#cd' + siblings[i].id) + .parent() + .before(li.html(div)); + li.slideDown('fast'); + return; + } + } + + // If we get here, this comment rates lower than all the others, + // or it is the only comment in the list. + ul.append(li.html(div)); + li.slideDown('fast'); + } + + function acceptComment(id) { + $.ajax({ + type: 'POST', + url: opts.acceptCommentURL, + data: {id: id}, + success: function(data, textStatus, request) { + $('#cm' + id).fadeOut('fast'); + $('#cd' + id).removeClass('moderate'); + }, + error: function(request, textStatus, error) { + showError('Oops, there was a problem accepting the comment.'); + } + }); + } + + function deleteComment(id) { + $.ajax({ + type: 'POST', + url: opts.deleteCommentURL, + data: {id: id}, + success: function(data, textStatus, request) { + var div = $('#cd' + id); + if (data == 'delete') { + // Moderator mode: remove the comment and all children immediately + div.slideUp('fast', function() { + div.remove(); + }); + return; + } + // User mode: only mark the comment as deleted + div + .find('span.user-id:first') + .text('[deleted]').end() + .find('div.comment-text:first') + .text('[deleted]').end() + .find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id + + ', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id) + .remove(); + var comment = div.data('comment'); + comment.username = '[deleted]'; + comment.text = '[deleted]'; + div.data('comment', comment); + }, + error: function(request, textStatus, error) { + showError('Oops, there was a problem deleting the comment.'); + } + }); + } + + function showProposal(id) { + $('#sp' + id).hide(); + $('#hp' + id).show(); + $('#pr' + id).slideDown('fast'); + } + + function hideProposal(id) { + $('#hp' + id).hide(); + $('#sp' + id).show(); + $('#pr' + id).slideUp('fast'); + } + + function showProposeChange(id) { + $('#pc' + id).hide(); + $('#hc' + id).show(); + var textarea = $('#pt' + id); + textarea.val(textarea.data('source')); + $.fn.autogrow.resize(textarea[0]); + textarea.slideDown('fast'); + } + + function hideProposeChange(id) { + $('#hc' + id).hide(); + $('#pc' + id).show(); + var textarea = $('#pt' + id); + textarea.val('').removeAttr('disabled'); + textarea.slideUp('fast'); + } + + function toggleCommentMarkupBox(id) { + $('#mb' + id).toggle(); + } + + /** Handle when the user clicks on a sort by link. */ + function handleReSort(link) { + var classes = link.attr('class').split(/\s+/); + for (var i=0; iThank you! Your comment will show up ' + + 'once it is has been approved by a moderator.'); + } + // Prettify the comment rating. + comment.pretty_rating = comment.rating + ' point' + + (comment.rating == 1 ? '' : 's'); + // Make a class (for displaying not yet moderated comments differently) + comment.css_class = comment.displayed ? '' : ' moderate'; + // Create a div for this comment. + var context = $.extend({}, opts, comment); + var div = $(renderTemplate(commentTemplate, context)); + + // If the user has voted on this comment, highlight the correct arrow. + if (comment.vote) { + var direction = (comment.vote == 1) ? 'u' : 'd'; + div.find('#' + direction + 'v' + comment.id).hide(); + div.find('#' + direction + 'u' + comment.id).show(); + } + + if (opts.moderator || comment.text != '[deleted]') { + div.find('a.reply').show(); + if (comment.proposal_diff) + div.find('#sp' + comment.id).show(); + if (opts.moderator && !comment.displayed) + div.find('#cm' + comment.id).show(); + if (opts.moderator || (opts.username == comment.username)) + div.find('#dc' + comment.id).show(); + } + return div; + } + + /** + * A simple template renderer. Placeholders such as <%id%> are replaced + * by context['id'] with items being escaped. Placeholders such as <#id#> + * are not escaped. + */ + function renderTemplate(template, context) { + var esc = $(document.createElement('div')); + + function handle(ph, escape) { + var cur = context; + $.each(ph.split('.'), function() { + cur = cur[this]; + }); + return escape ? esc.text(cur || "").html() : cur; + } + + return template.replace(/<([%#])([\w\.]*)\1>/g, function() { + return handle(arguments[2], arguments[1] == '%' ? true : false); + }); + } + + /** Flash an error message briefly. */ + function showError(message) { + $(document.createElement('div')).attr({'class': 'popup-error'}) + .append($(document.createElement('div')) + .attr({'class': 'error-message'}).text(message)) + .appendTo('body') + .fadeIn("slow") + .delay(2000) + .fadeOut("slow"); + } + + /** Add a link the user uses to open the comments popup. */ + $.fn.comment = function() { + return this.each(function() { + var id = $(this).attr('id').substring(1); + var count = COMMENT_METADATA[id]; + var title = count + ' comment' + (count == 1 ? '' : 's'); + var image = count > 0 ? opts.commentBrightImage : opts.commentImage; + var addcls = count == 0 ? ' nocomment' : ''; + $(this) + .append( + $(document.createElement('a')).attr({ + href: '#', + 'class': 'sphinx-comment-open' + addcls, + id: 'ao' + id + }) + .append($(document.createElement('img')).attr({ + src: image, + alt: 'comment', + title: title + })) + .click(function(event) { + event.preventDefault(); + show($(this).attr('id').substring(2)); + }) + ) + .append( + $(document.createElement('a')).attr({ + href: '#', + 'class': 'sphinx-comment-close hidden', + id: 'ah' + id + }) + .append($(document.createElement('img')).attr({ + src: opts.closeCommentImage, + alt: 'close', + title: 'close' + })) + .click(function(event) { + event.preventDefault(); + hide($(this).attr('id').substring(2)); + }) + ); + }); + }; + + var opts = { + processVoteURL: '/_process_vote', + addCommentURL: '/_add_comment', + getCommentsURL: '/_get_comments', + acceptCommentURL: '/_accept_comment', + deleteCommentURL: '/_delete_comment', + commentImage: '/static/_static/comment.png', + closeCommentImage: '/static/_static/comment-close.png', + loadingImage: '/static/_static/ajax-loader.gif', + commentBrightImage: '/static/_static/comment-bright.png', + upArrow: '/static/_static/up.png', + downArrow: '/static/_static/down.png', + upArrowPressed: '/static/_static/up-pressed.png', + downArrowPressed: '/static/_static/down-pressed.png', + voting: false, + moderator: false + }; + + if (typeof COMMENT_OPTIONS != "undefined") { + opts = jQuery.extend(opts, COMMENT_OPTIONS); + } + + var popupTemplate = '\ +
    \ +

    \ + Sort by:\ + best rated\ + newest\ + oldest\ +

    \ +
    Comments
    \ +
    \ + loading comments...
    \ +
      \ +
      \ +

      Add a comment\ + (markup):

      \ +
      \ + reStructured text markup: *emph*, **strong**, \ + ``code``, \ + code blocks: :: and an indented block after blank line
      \ +
      \ + \ +

      \ + \ + Propose a change ▹\ + \ + \ + Propose a change ▿\ + \ +

      \ + \ + \ + \ + \ +
      \ +
      \ +
      '; + + var commentTemplate = '\ +
      \ +
      \ +
      \ + \ + \ + \ + \ + \ + \ +
      \ +
      \ + \ + \ + \ + \ + \ + \ +
      \ +
      \ +
      \ +

      \ + <%username%>\ + <%pretty_rating%>\ + <%time.delta%>\ +

      \ +
      <#text#>
      \ +

      \ + \ + reply ▿\ + proposal ▹\ + proposal ▿\ + \ + \ +

      \ +
      \
      +<#proposal_diff#>\
      +        
      \ +
        \ +
        \ +
        \ +
        \ + '; + + var replyTemplate = '\ +
      • \ +
        \ +
        \ + \ + \ + \ + \ + \ +
        \ +
        \ +
      • '; + + $(document).ready(function() { + init(); + }); +})(jQuery); + +$(document).ready(function() { + // add comment anchors for all paragraphs that are commentable + $('.sphinx-has-comment').comment(); + + // highlight search words in search results + $("div.context").each(function() { + var params = $.getQueryParameters(); + var terms = (params.q) ? params.q[0].split(/\s+/) : []; + var result = $(this); + $.each(terms, function() { + result.highlightText(this.toLowerCase(), 'highlighted'); + }); + }); + + // directly open comment window if requested + var anchor = document.location.hash; + if (anchor.substring(0, 9) == '#comment-') { + $('#ao' + anchor.substring(9)).click(); + document.location.hash = '#s' + anchor.substring(9); + } +}); diff --git a/src/postorius/doc/_build/html/genindex.html b/src/postorius/doc/_build/html/genindex.html index db87b25..1f85e6d 100644 --- a/src/postorius/doc/_build/html/genindex.html +++ b/src/postorius/doc/_build/html/genindex.html @@ -1,19 +1,24 @@ + + + - Index — mailmanweb v0.1 documentation + Index — Postorius 1.0a2 documentation + + - + @@ -44,16 +49,20 @@
        -

        Index

        +

        Index

        -
        - T -
        +
        + T + +

        T

        + +
        tests.tests (module) +
        + +
        -
        tests.tests (module)
        -
        @@ -69,7 +78,7 @@ \ No newline at end of file diff --git a/src/postorius/doc/_build/html/index.html b/src/postorius/doc/_build/html/index.html index 7e643d9..c4302cd 100644 --- a/src/postorius/doc/_build/html/index.html +++ b/src/postorius/doc/_build/html/index.html @@ -3,17 +3,20 @@ + - Welcome to mailman_django’s documentation! — mailmanweb v0.1 documentation + Postorius - The New Mailman Web UI — Postorius 1.0a2 documentation + + - + @@ -38,7 +41,7 @@
      • next |
      • -
      • mailmanweb v0.1 documentation »
      • +
      • Postorius 1.0a2 documentation »
      • @@ -47,8 +50,8 @@
        -
        -

        Welcome to mailman_django’s documentation!

        +
        +

        Postorius - The New Mailman Web UI

        Contents:

        \ No newline at end of file diff --git a/src/postorius/doc/_build/html/news.html b/src/postorius/doc/_build/html/news.html index e44fcd4..f3b1084 100644 --- a/src/postorius/doc/_build/html/news.html +++ b/src/postorius/doc/_build/html/news.html @@ -3,17 +3,20 @@ + - News — mailmanweb v0.1 documentation + News — Postorius 1.0a2 documentation + + - + - + @@ -65,6 +68,15 @@ General Public License for more details.

        You should have received a copy of the GNU Lesser General Public License along with postorius. If not, see <http://www.gnu.org/licenses/>.

        +
        +

        1.0 alpha 2

        +

        (2012-XX-XX)

        +
          +
        • dev setup fix for Django 1.4 contributed by Rohan Jain
        • +
        • missing csrf tokens in templates contributed by Richard Wackerbarth (LP: 996658)
        • +
        • moderation: fixed typo in success message call
        • +
        +

        1.0 alpha 1 – “Space Farm”

        (2012-03-23)

        @@ -98,6 +110,7 @@

        Table Of Contents

        \ No newline at end of file diff --git a/src/postorius/doc/_build/html/objects.inv b/src/postorius/doc/_build/html/objects.inv index a9fe20b..0fcc642 100644 --- a/src/postorius/doc/_build/html/objects.inv +++ b/src/postorius/doc/_build/html/objects.inv Binary files differ diff --git a/src/postorius/doc/_build/html/py-modindex.html b/src/postorius/doc/_build/html/py-modindex.html index 7905325..0d82010 100644 --- a/src/postorius/doc/_build/html/py-modindex.html +++ b/src/postorius/doc/_build/html/py-modindex.html @@ -3,17 +3,20 @@ + - Python Module Index — mailmanweb v0.1 documentation + Python Module Index — Postorius 1.0a2 documentation + + - + @@ -37,7 +40,7 @@
      • modules |
      • -
      • mailmanweb v0.1 documentation »
      • +
      • Postorius 1.0a2 documentation »
      • @@ -79,7 +82,7 @@ \ No newline at end of file diff --git a/src/postorius/doc/_build/html/search.html b/src/postorius/doc/_build/html/search.html index a364bf9..fd1824c 100644 --- a/src/postorius/doc/_build/html/search.html +++ b/src/postorius/doc/_build/html/search.html @@ -3,17 +3,20 @@ + - Search — mailmanweb v0.1 documentation + Search — Postorius 1.0a2 documentation + + - + @@ -40,7 +43,7 @@
      • modules |
      • -
      • mailmanweb v0.1 documentation »
      • +
      • Postorius 1.0a2 documentation »
      • @@ -91,12 +94,12 @@
      • modules |
      • -
      • mailmanweb v0.1 documentation »
      • +
      • Postorius 1.0a2 documentation »
      • \ No newline at end of file diff --git a/src/postorius/doc/_build/html/searchindex.js b/src/postorius/doc/_build/html/searchindex.js index 48304f3..5199589 100644 --- a/src/postorius/doc/_build/html/searchindex.js +++ b/src/postorius/doc/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({objects:{tests:{tests:[3,0,1]}},terms:{all:[3,1,2],code:[3,1,2],forget:3,prefil:3,four:[],ackownledg:[],runserv:1,dirnam:1,follow:[3,1],content:[0,1,3],decid:1,depend:2,authoris:[],send:[],granci:2,under:2,introduc:1,merchant:2,sourc:[],everi:1,string:3,far:1,none:3,offlin:1,util:3,context_processor:1,mechan:3,exact:3,special:1,contenttyp:1,administr:3,level:1,did:3,button:3,list:[3,1,2],"try":3,item:3,adjust:1,localhost:[3,1],httpredirectobject:3,quick:1,setup:[3,1,2],dir:1,pleas:[3,1],modelbackend:1,impli:2,httpresponseredirect:3,cfg:[],seper:1,request:3,past:1,second:1,download:1,further:[],click:3,compat:1,index:3,what:[],name_of_permiss:[],appear:1,sum:[],abl:[3,1],current:3,delet:3,new_list1:3,postoriu:[2,1],franziska:[],"new":[0,2,3],net:1,"public":2,gener:2,remeb:1,here:1,themself:[],ubuntu:1,path:1,along:2,modifi:[3,1,2],sinc:[],valu:[3,1],search:[],mailinglist:[],vertifi:1,anymor:1,step:1,jame:3,doctest:3,action:3,chang:1,mailman_media:1,contactpag:[],via:[],appli:1,app:[0,1,2,3],sponser:[],foundat:2,api:1,sponsel:[],instal:[0,1,3],middlewar:1,from:[3,1],describ:3,would:1,commun:1,doubl:3,two:[],perm:[],next:1,websit:1,few:1,call:1,recommend:1,type:3,web_host:3,mailman_django:[0,1],abspath:1,relat:3,ital:[],site:[3,1],warn:[3,1],trail:1,berlio:[],stick:1,particular:2,hold:1,unpack:1,easiest:3,account:2,join:1,prepar:1,work:1,uniqu:[],dev:1,itself:1,can:[3,1,2],purpos:2,defer:2,login_requir:3,tar:1,process:2,sudo:1,accept:2,topic:[],want:[3,1],nearli:1,cours:1,multipl:[],anoth:3,faulti:[],georg:3,write:[],how:1,reject:2,instead:[3,1],config:1,css:1,updat:[3,1],resourc:[0,1,3],farm:2,after:[3,1],"long":1,usabl:[],befor:[3,1],wrong:3,mai:[],end:1,data:[3,1],postfix:1,bind:1,bootstrap:1,django:[0,1,2,3],alias:2,adverrtis:3,allow:[3,1],enter:3,fallback:1,automaticli:[],egg:1,order:[],listnam:3,help:[],becaus:3,has_perm:[],style:1,directli:3,fit:2,browserid:2,better:1,restart:1,onc:1,mail:[3,2],hidden:1,main:[],might:1,guarente:1,split:1,them:1,"return":[],thei:3,python:[3,1],auth:1,unfortuneatli:[],mention:[3,1],front:3,now:[3,1],term:2,benst:1,somewher:1,name:[3,1],anyth:[],edit:[3,2],simpl:1,authent:[],separ:3,easili:1,senarclen:2,each:3,debug:[3,1],found:[3,1],went:3,mailman_test_bindir:1,domain:[3,2],replac:[],idea:[],procedur:[],realli:[3,1],redistribut:2,meta:3,"static":[],connect:1,our:[3,1],todo:[],dependeci:1,out:2,shown:3,space:2,miss:[],develop:[0,1,2,3],publish:2,api_us:[3,1],profil:2,daniel:2,rest_serv:1,got:1,correct:[],earlier:1,free:[3,1,2],cooki:[],reason:1,base:1,mailmanweb:[],lists_of_domain:1,put:1,org:[2,1],"40mail":3,launch:1,could:1,latest:1,membership:3,keep:1,filter:[],thing:[3,1],place:1,isn:[],root_urlconf:1,requireti:[],summari:3,first:[3,1],softwar:2,rang:[],render:1,feel:[3,1],media_root:1,natti:1,restrict:3,instruct:[3,1],alreadi:[3,1],done:[3,1],least:3,authentif:[3,1],owner:3,stabl:[3,1],installed_app:1,open:3,gpl:[],differ:1,rrze:[],benedict:2,hardcopi:1,licens:2,system:1,messag:[3,1,2],licenc:[],fullfil:1,"final":3,store:[],shell:[3,1],option:[3,1],real_nam:3,copi:[2,1],specifi:3,gsoc:1,part:[3,1],pars:3,priveledg:1,serv:1,enjoi:3,provid:[3,2],remov:[3,2],new_domain:[],project:1,were:[3,1],posit:3,minut:1,fqdn_listnam:3,pre:[],ani:[2,1],packag:1,have:[3,1,2],tabl:1,need:[3,1],element:1,inform:[],florian:1,destroi:1,client:[3,1],note:[3,1],also:1,without:[3,2],take:[],indic:3,singl:3,even:2,sure:[3,1],kati:3,distribut:2,shall:3,usernam:1,object:3,most:3,plan:1,letter:3,watt:3,alpha:2,"class":1,icon:[],don:[3,1],bzr:1,url:[3,1],doc:[],later:1,cover:[],temporili:3,doe:3,mm_membership:3,usual:1,came:[],show:[3,2],text:3,liza:3,session:[3,1],permiss:[3,1],corner:[],fine:1,find:1,redirect:3,absolut:1,onli:[3,1],eas:1,locat:[],launchpad:1,copyright:2,explain:3,configur:1,apach:1,should:[3,1,2],version:[2,1],suppos:1,templat:1,local:3,hope:2,media_url:1,contribut:2,get:[3,1],"__file__":1,stop:3,obviou:[],csrf:1,subscript:3,requir:[3,1],template_dir:1,whether:3,common:[],restadmin:1,where:1,view:[3,1],wiki:1,set:[3,1,2],see:[3,1,2],domain_admin:[],result:1,respons:3,fail:[3,1],wonder:[],awar:[3,1],statu:3,mailman3a7:1,correctli:[],databas:3,someth:3,restbackend:1,behind:[],between:[3,1],"import":3,awai:1,email:3,realnam:[],correclti:1,advertis:3,subfold:1,addit:[],both:1,last:3,plugin:1,admin:1,howev:1,etc:[],instanc:3,context:1,delete_list:3,logout:[],login:[3,1,2],com:[3,1],load:3,english:3,simpli:[3,1],point:1,instanti:[],overview:3,address:[3,1],header:[],non:1,linux:3,guid:[3,1],backend:1,mailman:[3,1,2],coupl:[3,1],"0a7":1,been:3,compon:1,much:1,unsubscrib:[3,2],modif:1,upcom:1,xxx:[],togeth:[3,1],i18n:1,ngeorg:3,those:[3,1],"case":[3,1],creativecommon:[],therefor:[],look:[],gnu:[2,1],plain:[],align:1,lesser:2,dashboard:3,abov:3,mail_host:3,everyon:1,authentication_backend:1,new_list:[],demo:[],metric:2,list_own:3,archiv:3,revis:1,subscrib:[3,2],decor:[3,1],let:3,welcom:0,author:[],receiv:2,media:1,make:[3,1],belong:3,same:[3,1],handl:1,html:1,gui:3,document:[0,1],mod_wsgi:1,finish:3,http:[3,1,2],upon:[],moment:1,http_host:3,initi:2,mani:2,implement:2,expand:[],appropri:1,framework:[],api_pass:[3,1],well:[3,1],membership_set:[],exampl:[3,1],command:1,thi:[3,1,2],choos:3,everyth:[3,1],left:[],summer:2,just:1,rest:[3,1],mailman3:[3,1],webui:1,yet:[],languag:3,web:[2,1],easi:1,project_path:1,had:[],list_summari:3,mailmanwebgsoc2011:1,add:[3,1,2],other:[3,1],lawrenc:1,save:[],modul:[3,1],bin:1,applic:1,which:[3,1],stein:2,unter:[],know:1,gsoc_mailman:1,press:3,password:1,tweak:[],authbackend:[],like:1,template_context_processor:1,success:3,restpass:1,server:[2,1],href:[],setup_mm:3,either:3,page:[3,1],www:[2,1],right:1,acknowledg:[],creation:3,some:[3,1],proper:2,home:1,funcit:[],basic:2,buildout:1,djangoproject:1,confirm:3,woun:1,thank:2,select:[],slash:1,necessari:[],testobject:3,anna:2,refer:3,machin:3,core:1,who:[],run:[3,1],bold:[],symlink:1,host:[],repositori:1,post:3,mm_new_domain:[],stage:[],about:1,central:[],usa:3,mass_subscrib:3,acl:[],permission_requir:[],act:[],fals:3,discard:2,processor:1,block:3,own:[3,1],addus:[],status_cod:3,within:[3,1],warranti:2,creativ:[],empti:3,contrib:1,your:1,manag:[3,1],choosen:3,span:3,log:3,wai:3,"40exampl":3,execut:3,print:3,submit:3,custom:1,avail:[3,1],start:[3,1],reli:[],interfac:2,includ:[3,1],suit:3,systers_django:[],"function":[3,1],head:[],form:[3,2],offer:3,descrip:1,link:[3,1],translat:3,teardown_mm:3,branch:1,line:3,"true":3,info:2,succe:3,made:[3,1],render_mailman_them:1,possibl:1,"default":1,access:[3,1,2],displai:[3,1],below:3,memebership:[],otherwis:1,more:2,extend_ajax:1,proud:[],creat:[3,1],hardcod:[],dure:[3,1,2],doesn:[],exist:1,file:1,syncdb:1,check:[3,1,2],inc:2,again:1,successfulli:1,googl:2,titl:[],user:[3,1,2],when:1,detail:2,gettext:3,mizyrycki:2,valid:3,futur:1,rememb:[],test:[3,1],you:[3,1,2],nice:3,why:3,prequir:[],consid:1,stai:[],outdat:[3,1],bullet:[],directori:[3,1],bottom:[],descript:[3,1],mailman_them:1,mass:[3,2],time:[3,1],escap:3},objtypes:{"0":"py:module"},titles:["Welcome to mailman_django’s documentation!","Installation","News","Using the Django App - Developers Resource"],objnames:{"0":"Python module"},filenames:["index","setup","news","using"]}) \ No newline at end of file +Search.setIndex({objects:{tests:{tests:[2,0,1,""]}},terms:{all:[3,2],code:[3,2],forget:2,prefil:2,four:[],ackownledg:[],runserv:[],dirnam:[],follow:[2,1],content:[0,2],decid:[],depend:3,authoris:[],send:[],shall:2,granci:3,under:3,introduc:[],merchant:3,sourc:[],everi:[],string:2,far:[],none:2,offlin:[],util:2,context_processor:[],mechan:2,exact:2,special:[],contenttyp:[],administr:2,level:[],did:2,button:2,list:[3,2],"try":2,item:2,adjust:[],localhost:2,quick:[],setup:[3,2],dir:[],pleas:2,modelbackend:[],impli:3,httpresponseredirect:2,cfg:[],seper:[],request:2,past:[],second:[],download:[],further:[],click:2,compat:[],index:2,what:[],name_of_permiss:[],appear:[],richard:3,sum:[],abl:2,current:2,delet:2,new_list1:2,postoriu:[0,1,3],franziska:[],"new":[0,2,3],net:[],"public":3,abov:2,gener:3,never:1,remeb:[],here:[],themself:[],ubuntu:[],path:[],along:3,modifi:[3,2],sinc:[],valu:2,search:[],mailinglist:[],vertifi:[],anymor:[],step:[],jame:2,doctest:2,action:2,chang:[],mailman_media:[],contactpag:[],via:[],appli:[],app:[0,2,3],sponser:[],foundat:3,api:[],sponsel:[],instal:[0,1,2],middlewar:[],from:2,describ:2,would:[],commun:[],doubl:2,two:[],perm:[],next:[],websit:[],few:[],call:3,typo:3,recommend:[],type:2,web_host:2,mailman_django:[],abspath:[],relat:2,ital:[],site:2,warn:[2,1],trail:[],berlio:[],stick:[],particular:3,hold:[],unpack:[],easiest:2,account:3,join:[],prepar:[],work:[],uniqu:[],dev:[3,1],itself:[],can:[3,2],purpos:3,defer:3,login_requir:2,tar:[],process:3,sudo:[],accept:3,topic:[],want:2,nearli:[],cours:[],multipl:[],anoth:2,faulti:[],georg:2,write:[],how:[],reject:3,instead:2,config:[],css:[],updat:2,product:1,resourc:[0,2],farm:3,after:2,"long":[],usabl:[],befor:2,wrong:2,mai:[],end:[],data:2,postfix:[],bind:[],bootstrap:[],django:[0,2,3],alias:3,environ:1,adverrtis:2,jain:3,enter:2,fallback:[],automaticli:[],egg:[],order:[],listnam:2,help:[],becaus:2,has_perm:[],style:[],directli:2,fit:3,fix:3,browserid:3,better:[],restart:[],onc:[],mail:[3,2],hidden:[],main:[],might:[],guarente:[],split:[],them:[],"return":[],thei:2,python:[2,1],auth:[],unfortuneatli:[],mention:2,front:2,now:2,term:3,benst:[],somewher:[],name:2,anyth:[],edit:[3,2],simpl:[],authent:[],separ:2,easili:[],senarclen:3,each:2,debug:2,found:2,went:2,mailman_test_bindir:[],domain:[3,2],replac:[],idea:[],procedur:[],realli:2,redistribut:3,meta:2,"static":[],connect:[],our:2,todo:[],dependeci:[],out:3,shown:2,space:3,miss:3,develop:[0,1,2,3],publish:3,api_us:2,profil:3,daniel:3,rest_serv:[],got:[],correct:[],earlier:[],free:[3,2],cooki:[],reason:[],base:[],mailmanweb:[],lists_of_domain:[],put:[],org:[3,1],"40mail":2,launch:[],could:[],latest:[],membership:2,keep:[],filter:[],thing:2,place:[],isn:[],root_urlconf:[],requireti:[],summari:2,first:2,softwar:3,rang:[],render:[],feel:2,media_root:[],natti:[],restrict:2,instruct:[2,1],alreadi:2,done:2,least:2,authentif:2,owner:2,stabl:2,installed_app:[],open:2,gpl:[],differ:[],rrze:[],benedict:3,hardcopi:[],licens:3,system:[],messag:[3,2],licenc:[],fullfil:[],"final":2,store:[],shell:2,option:2,real_nam:2,copi:3,specifi:2,gsoc:[],part:2,pars:2,priveledg:[],serv:[],enjoi:2,provid:[3,2],remov:[3,2],new_domain:[],project:[],were:2,posit:2,minut:[],fqdn_listnam:2,pre:[],ani:3,packag:1,have:[3,2],tabl:[],need:2,element:[],inform:[],florian:[],destroi:[],client:2,note:[2,1],also:[],without:[3,2],take:[],indic:2,singl:2,even:3,sure:2,kati:2,allow:2,httpredirectobject:2,usernam:[],object:2,most:2,plan:[],letter:2,watt:2,alpha:3,"class":[],icon:[],don:2,bzr:[],url:2,doc:[],later:[],cover:1,temporili:2,doe:2,mm_membership:2,usual:[],came:[],show:[3,2],text:2,liza:2,session:2,permiss:2,corner:[],fine:[],find:[],redirect:2,absolut:[],onli:[2,1],eas:[],locat:[],launchpad:[],copyright:3,explain:2,configur:[],apach:1,should:[3,1,2],version:3,suppos:[],templat:3,local:[2,1],hope:3,media_url:[],contribut:3,get:2,"__file__":[],stop:2,obviou:[],csrf:3,subscript:2,requir:2,template_dir:[],whether:2,common:[],restadmin:[],where:[],view:2,wiki:[],set:[3,2],see:[3,2],domain_admin:[],result:[],respons:2,fail:2,wonder:[],awar:2,statu:2,mailman3a7:[],correctli:[],databas:2,someth:2,restbackend:[],behind:[],between:2,"import":2,awai:[],email:2,realnam:[],correclti:[],advertis:2,subfold:[],addit:[],both:[],last:2,plugin:[],admin:[],howev:[],etc:[],instanc:2,context:[],delete_list:2,logout:[],login:[3,2],com:2,load:2,english:2,simpli:2,point:[],instanti:[],overview:2,address:2,header:[],non:[],linux:2,guid:[2,1],backend:[],mailman:[0,1,2,3],coupl:2,"0a7":[],been:2,compon:[],much:[],unsubscrib:[3,2],modif:[],upcom:[],xxx:[],togeth:2,i18n:[],ngeorg:2,those:2,"case":2,creativecommon:[],therefor:[],look:[],gnu:[3,1],plain:[],align:[],lesser:3,"while":1,dashboard:2,publicli:1,mail_host:2,everyon:[],authentication_backend:[],new_list:[],demo:[],metric:3,list_own:2,archiv:2,revis:[],subscrib:[3,2],decor:2,let:2,welcom:[],author:[],receiv:3,media:[],make:[2,1],belong:2,same:2,handl:[],html:[],gui:2,document:1,mod_wsgi:1,finish:2,http:[3,1,2],upon:[],moment:[],http_host:2,initi:3,mani:3,implement:3,expand:[],appropri:[],moder:3,framework:[],api_pass:2,well:2,membership_set:[],exampl:2,command:[],thi:[3,1,2],choos:2,everyth:2,left:[],summer:3,just:[],rest:2,mailman3:2,webui:[],yet:[],languag:2,web:[0,1,3],easi:[],project_path:[],had:[],list_summari:2,mailmanwebgsoc2011:[],add:[3,2],other:2,lawrenc:[],save:[],modul:2,bin:[],applic:[],which:2,stein:3,unter:[],know:[],gsoc_mailman:[],press:2,password:[],tweak:[],authbackend:[],like:[],template_context_processor:[],success:[3,2],restpass:[],server:[3,1],href:[],setup_mm:2,either:2,page:2,www:3,right:[],acknowledg:[],creation:2,some:2,proper:3,home:[],funcit:[],distribut:3,basic:3,buildout:[],djangoproject:[],confirm:2,woun:[],thank:3,select:[],slash:[],necessari:[],testobject:2,anna:3,refer:2,machin:2,core:[],who:[],run:2,bold:[],symlink:[],host:[],repositori:[],post:2,mm_new_domain:[],stage:[],about:[],central:[],usa:2,mass_subscrib:2,rohan:3,acl:[],permission_requir:[],act:[],fals:2,discard:3,processor:[],block:2,own:2,addus:[],status_cod:2,within:2,warranti:3,creativ:[],empti:2,contrib:[],your:[],manag:2,choosen:2,span:2,log:2,wai:2,"40exampl":2,execut:2,print:2,submit:2,custom:[],avail:[2,1],start:2,reli:[],interfac:[3,1],includ:2,suit:2,systers_django:[],"function":2,head:[],form:[3,2],offer:2,descrip:[],link:2,translat:2,teardown_mm:2,branch:[],line:2,"true":2,info:3,succe:2,made:2,render_mailman_them:[],possibl:1,"default":[],access:[3,2],displai:2,below:2,memebership:[],otherwis:[],more:3,extend_ajax:[],proud:[],creat:2,hardcod:[],dure:[3,2],doesn:[],exist:[],file:[],syncdb:[],wackerbarth:3,check:[3,2],inc:3,again:[],successfulli:[],googl:3,titl:[],user:[3,1,2],when:[],detail:3,gettext:2,mizyrycki:3,valid:2,futur:[],rememb:[],test:2,you:[3,1,2],nice:2,why:2,prequir:[],consid:[],stai:[],outdat:2,bullet:[],directori:2,bottom:[],descript:2,mailman_them:[],mass:[3,2],token:3,time:2,escap:2},objtypes:{"0":"py:module"},titles:["Postorius - The New Mailman Web UI","Installation","Using the Django App - Developers Resource","News"],objnames:{"0":["py","module","Python module"]},filenames:["index","setup","using","news"]}) \ No newline at end of file diff --git a/src/postorius/doc/_build/html/setup.html b/src/postorius/doc/_build/html/setup.html index 09f163c..44bcba6 100644 --- a/src/postorius/doc/_build/html/setup.html +++ b/src/postorius/doc/_build/html/setup.html @@ -3,17 +3,20 @@ + - Installation — mailmanweb v0.1 documentation + Installation — Postorius 1.0a2 documentation + + - + @@ -42,7 +45,7 @@
      • previous |
      • -
      • mailmanweb v0.1 documentation »
      • +
      • Postorius 1.0a2 documentation »
      • @@ -53,242 +56,23 @@

        Installation

        -
        -
        -

        Warning

        -

        This installation guide is outdated and needs to be updated. -Please use the following resources instead:

        -

        To install GNU Mailman follow the instructions in the documentation: +

        +

        Note

        +

        This installation guide covers Postorius, the web user interface for +GNU Mailman 3. To install GNU Mailman follow the instructions in the documentation: http://packages.python.org/mailman/

        -

        A description how to run postorius on Django’s dev server, can be found in -the GNU Mailman wiki: -http://wiki.list.org/display/DEV/A+5+minute+guide+to+get+the+Mailman+web+UI+running

        -

        You can also find a guide how to run postorius using the Apache web server -on the Mailman wiki: -http://wiki.list.org/display/DEV/How+to+get+Postorius+running+on+Apache+and+mod_wsgi

        -
        -
        -

        Mailman3 - a7

        -
          -
        • -
          Check Dependecys
          -
          -

          Note

          -

          This might differ on different systems - I was testing Ubuntu 11.04 natty and needed to install Postfix before running the installation.

          -
          -
          -
          -
        • -
        • Download or branch Mailman3a7 from http://launchpad.net/mailman/3.0/3.0.0a7/+download/mailman-3.0.0a7.tar.gz and unpack it.

          -
        • -
        • -
          Change into the unpacked DIR which might be named “mailman-3.0.0a7”
          -
          -

          Note

          -

          Please be aware that the following steps only work if you’re really in that DIR. If you consider adding a subfolder name to the commands those woun’t work !

          -
          -
          -
          -
        • -
        • Run the Installation from a Shell (not Python)

          -
          -
          $ python bootstrap.py
          -$ bin/buildout
          -
          -
          -
          -
        • -
        • Vertify that everything was setup correclty and your branch fullfills the version requirements by running it’s own test module

          -
          -
          $ bin/test
          -
          -
          -
          -
        • -
        • Now you’re able to run mailman using

          -
          -
          $ bin/mailman
          -
          -
          -
          -
        • -
        -
        -
        -

        Mailman Client / REST Api

        -

        Next thing you need to do is installing the Plugin used for communication with non-mailman-code parts like our WebUI. Within the Client Branch we’ve put both, Classes to access the Core which are run as a Plugin and some Python Bindings. -The Python Bindings were used later on within our Django Application to access the Server. Failing to install the Client would result in an offline version of WebUI

        -

        Once again start by branching the code which is on Launchpad

        -
        -
        $ bzr branch lp:mailman.client
        -
        -
        -
        -
        -

        Note

        -

        We’ve successfully tested our functionality with Revision 16 - In case the Client gets updated which it surely will in future we can’t guarentee that it is compatible anymore.

        -
        -

        As you only want to run the Client and not modify it’s code you’re fine with running the install command from within the directory. At the moment this requires Sudo Priveledges as files will copied to the Python Site-Packages Directory which is available to all users.

        -
        -
        $ sudo python setup.py install
        -
        -
        -
        -
        -

        Note

        -

        If you want to change parts of the Client you can use the development option which will create a Symlink instead of a Hardcopy of all files:

        -
        $ sudo python setup.py develop
        -
        +
        +

        Installing for Development

        +
        +

        Warning

        +

        You should use the development server only locally. While it’s possible to +make the dev server available publicly, you should never do that in a +production environment.

        -

        All changes will apply once you restart Mailman itself.

        -
        -
        -

        Django 1.3

        -

        During our development we started a Django Site based on the 1.2 Version which is included into Ubuntu’s repositorys. This made the installation easy but we ended up having some points which would get a much better code when using some elements introducing in 1.3. -As Mailman is supposed to be long-time stable - or however you call it - we decided that we should stick to the latest stable version right away. For this reason you’re required to install Django 1.3+ which is descriped on their Website. (https://www.djangoproject.com/download/)

        -
        -

        Note

        -

        Please be Aware that it’s not recommended to run both 1.2 and 1.3 at the same time

        -
        -

        In Django you’ve got 3 different levels of data. -- Django Installation Files -- Django Site -- Django Apps -usually you don’t see the Installation as it’s hidden somewhere within the System and the Apps are simply included into The Site Directory. -As we wanted to have the possibility to include the App into any Django Site which might already exist we decided to keep Site and App seperated.

        -

        During GSoC we’ve used different branches for this: -- lp:mailmanwebgsoc2011 -- lp:mailmanwebgsoc2011/django-site-0.1

        -
        -
        -

        Django Site Installation

        -

        We’ve created this branch for quick development - everyone is free to use his own Django site, but this one already includes a couple of modifications we’ve made that will allow running the Development Server just a few seconds after Branching both Site and App.

        -

        As far as I know at the moment we’ve made the following alignments: (All of these are in the settings.py file of the Django Site)

        -
        -

        REST_SERVER = ‘localhost:8001’ -API_USER = ‘restadmin’ -API_PASS = ‘restpass’

        -
        -

        Note

        -

        These are the default values used by the Mailman Client we’ve installed earlier. Feel free to modify the password and username if you need to.

        -
        -
        -

        MAILMAN_TEST_BINDIR = ‘/home/benste/Projects/Gsoc_mailman/mailman-3.0.0a7/bin’ -#/home/florian/Development/mailman/bin’

        -
        -
        -

        Note

        -

        Running the test modules requires to launch a special version of mailman with it’s own testing DB otherwise you’d destroy you’re sites content during testing. This Path needs to point to YOUR own installation of mailman.

        -
        -
        -

        MAILMAN_THEME = “default”

        -
        -
        -

        Note

        -

        We decided to allow simple Appearance Modifications, to use a custom CSS you could simply add a Directory within the media directory of the app and Link it’s name here. All HTML Pages will use the Styles from the Directory mentioned in here

        -
        -
        -

        PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) -MEDIA_ROOT = os.path.join(os.path.split(PROJECT_PATH)[0], “mailman_django/media/mailman_django/”)

        -
        -
        -

        Note

        -

        Absolute path to the directory that holds media. -Example: “/home/media/media.lawrence.com/”

        -
        -
        -

        MEDIA_URL = ‘/mailman_media/’

        -
        -
        -

        Note

        -

        URL that handles the media served from MEDIA_ROOT. Make sure to use a trailing slash if there is a path component (optional in other cases).Examples: “http://media.lawrence.com”, “http://example.com/media/

        -
        -
        -
        -
        AUTHENTICATION_BACKENDS = (
        -

        ‘mailman_django.auth.restbackend.RESTBackend’, -‘django.contrib.auth.backends.ModelBackend’ -)

        -
        -

        Note

        -

        This creates a connection in between Djangos Login and Permission Decorators which we use for authentification and a custom Backend which we created in Preparation to work together with the REST API or an upcoming Middleware. -You need to keep the Django one for testing fallback.

        -
        -
        -
        TEMPLATE_CONTEXT_PROCESSORS=(
        -

        “django.contrib.auth.context_processors.auth”, -“django.core.context_processors.debug”, -“django.core.context_processors.i18n”, -“django.core.context_processors.media”, -“django.core.context_processors.csrf”, -“django.contrib.messages.context_processors.messages”, -“mailman_django.context_processors.lists_of_domain”, -“mailman_django.context_processors.render_MAILMAN_THEME”, -“mailman_django.context_processors.extend_ajax”

        -
        -

        Note

        -

        We’re using Context Processors to easily render value which we need in nearly every view.

        -
        -
        -
        -

        ROOT_URLCONF = ‘mailman_django.urls’

        -
        -
        -

        Note

        -

        This is where our URL Config is - if you run your own site with other Apps as well you might want to adjust this to your urls.py which includes our file.

        -
        -
        -
        -
        TEMPLATE_DIRS = (
        -

        os.path.join(PROJECT_PATH, “mailman_django/templates”),

        -
        -

        Note

        -

        Adds our own Templates

        -
        -
        -
        INSTALLED_APPS = (
        -

        ‘django.contrib.auth’, -‘django.contrib.contenttypes’, -‘django.contrib.sessions’, -‘django.contrib.sites’, -‘django.contrib.admin’, -‘mailman_django’,

        -
        -

        Note

        -

        Makes sure that Django knows about our directory as an App and creates needed Tables () when running

        -
        -
        $ python manage.py syncdb
        -
        -
        -
        -
        -

        Now that you know about all these you might start the development server. As usual in Django this is done by running

        -
        -
        $ python manage.py runserver
        -
        -
        -
        -

        within the Django Site Directory - as usual the default address is localhost:8000 -Of course it will only be able to start once our app is in place as well.

        -
        -
        -

        Django Application

        -

        First get the files, and make sure you paste them into your Project directory and adjust it’s name to the appropriate configuration you’ve made earlier in the Django Site. Remeber our default is mailman_django

        -
        -
        $ bzr branch lp:mailmanwebgsoc2011
        -
        -
        -
        -
        -

        Note

        -

        We’ve tested Revision 172

        -
        -
        -

        Note

        -

        We’re planning to ease up installation by creating an egg

        -
        +
        +

        Apache and mod_Wsgi

        @@ -301,11 +85,8 @@

        Table Of Contents

        @@ -324,7 +105,7 @@ \ No newline at end of file diff --git a/src/postorius/doc/_build/html/using.html b/src/postorius/doc/_build/html/using.html index a974ecd..cbf455f 100644 --- a/src/postorius/doc/_build/html/using.html +++ b/src/postorius/doc/_build/html/using.html @@ -3,17 +3,20 @@ + - Using the Django App - Developers Resource — mailmanweb v0.1 documentation + Using the Django App - Developers Resource — Postorius 1.0a2 documentation + + - + @@ -38,7 +41,7 @@
      • previous |
      • -
      • mailmanweb v0.1 documentation »
      • +
      • Postorius 1.0a2 documentation »
      • @@ -372,7 +375,7 @@ \ No newline at end of file diff --git a/src/postorius/doc/conf.py b/src/postorius/doc/conf.py index 0c6eb9f..c33b635 100644 --- a/src/postorius/doc/conf.py +++ b/src/postorius/doc/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# mailmanweb documentation build configuration file, created by +# Postorius documentation build configuration file, created by # sphinx-quickstart on Wed Aug 17 15:43:10 2011. # # This file is execfile()d with the current directory set to its containing dir. @@ -44,17 +44,17 @@ master_doc = 'index' # General information about the project. -project = u'mailmanweb' -copyright = u'2011, Benedict Stein' +project = u'Postorius' +copyright = u'2012, The Free Software Foundation' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '0.1' +version = '1.0a2' # The full version, including alpha/beta/rc tags. -release = '0.1' +release = '1.0a2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -168,7 +168,7 @@ #html_file_suffix = None # Output file base name for HTML help builder. -htmlhelp_basename = 'mailmanwebdoc' +htmlhelp_basename = 'postoriusdoc' # -- Options for LaTeX output -------------------------------------------------- @@ -182,8 +182,8 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'mailmanweb.tex', u'mailman\\_django Documentation', - u'Benedict Stein', 'manual'), + ('index', 'postoriusweb.tex', u'Postorius Documentation', + u'Mailman Coders', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -215,18 +215,18 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'mailmanweb', u'mailmanweb Documentation', - [u'Benedict Stein'], 1) + ('index', 'postorius', u'Postorius Documentation', + [u'Mailman Coders'], 1) ] # -- Options for Epub output --------------------------------------------------- # Bibliographic Dublin Core info. -epub_title = u'mailmanweb' -epub_author = u'Benedict Stein' -epub_publisher = u'Benedict Stein' -epub_copyright = u'2011, Benedict Stein' +epub_title = u'postorius' +epub_author = u'Mailman Coders' +epub_publisher = u'Mailman Coders' +epub_copyright = u'2012, The Free Software Foundation' # The language of the text. It defaults to the language option # or en if the language is not set. diff --git a/src/postorius/doc/index.rst b/src/postorius/doc/index.rst index b34141c..b6027ff 100644 --- a/src/postorius/doc/index.rst +++ b/src/postorius/doc/index.rst @@ -1,5 +1,5 @@ -Welcome to Postorius' documentation! -========================================== +Postorius - The New Mailman Web UI +================================== Contents: diff --git a/src/postorius/doc/setup.rst b/src/postorius/doc/setup.rst index cd5d54e..63257c4 100644 --- a/src/postorius/doc/setup.rst +++ b/src/postorius/doc/setup.rst @@ -1,202 +1,21 @@ Installation ============ - .. warning:: - This installation guide is outdated and needs to be updated. - Please use the following resources instead: - - To install GNU Mailman follow the instructions in the documentation: - http://packages.python.org/mailman/ - - A description how to run postorius on Django's dev server, can be found in - the GNU Mailman wiki: - http://wiki.list.org/display/DEV/A+5+minute+guide+to+get+the+Mailman+web+UI+running - - You can also find a guide how to run postorius using the Apache web server - on the Mailman wiki: - http://wiki.list.org/display/DEV/How+to+get+Postorius+running+on+Apache+and+mod_wsgi - -Mailman3 - a7 -------------- - -* Check Dependecys - .. note:: - This might differ on different systems - I was testing Ubuntu 11.04 natty and needed to install Postfix before running the installation. -* Download or branch Mailman3a7 from http://launchpad.net/mailman/3.0/3.0.0a7/+download/mailman-3.0.0a7.tar.gz and unpack it. -* Change into the unpacked DIR which might be named "mailman-3.0.0a7" - .. note:: - Please be aware that the following steps only work if you're really in that DIR. If you consider adding a subfolder name to the commands those woun't work ! -* Run the Installation from a Shell (not Python) - - .. code-block:: bash - - $ python bootstrap.py - $ bin/buildout - -* Vertify that everything was setup correclty and your branch fullfills the version requirements by running it's own test module - - .. code-block:: bash - - $ bin/test - -* Now you're able to run mailman using - - .. code-block:: bash - - $ bin/mailman - -Mailman Client / REST Api -------------------------- - -Next thing you need to do is installing the Plugin used for communication with non-mailman-code parts like our WebUI. Within the Client Branch we've put both, Classes to access the Core which are run as a Plugin and some Python Bindings. -The Python Bindings were used later on within our Django Application to access the Server. Failing to install the Client would result in an offline version of WebUI - -Once again start by branching the code which is on Launchpad - - .. code-block:: bash - - $ bzr branch lp:mailman.client - .. note:: - We've successfully tested our functionality with Revision 16 - In case the Client gets updated which it surely will in future we can't guarentee that it is compatible anymore. + This installation guide covers Postorius, the web user interface for + GNU Mailman 3. To install GNU Mailman follow the instructions in the documentation: + http://packages.python.org/mailman/ + -As you only want to run the Client and not modify it's code you're fine with running the install command from within the directory. At the moment this requires Sudo Priveledges as files will copied to the Python Site-Packages Directory which is available to all users. +Installing for Development +-------------------------- - .. code-block:: bash - - $ sudo python setup.py install +.. warning:: + You should use the development server only locally. While it's possible to + make the dev server available publicly, you should never do that in a + production environment. -.. note:: - If you want to change parts of the Client you can use the development option which will create a Symlink instead of a Hardcopy of all files: - .. code-block:: bash - - $ sudo python setup.py develop +Apache and mod_Wsgi +------------------- -All changes will apply once you restart Mailman itself. - -Django 1.3 ----------- -During our development we started a Django Site based on the 1.2 Version which is included into Ubuntu's repositorys. This made the installation easy but we ended up having some points which would get a much better code when using some elements introducing in 1.3. -As Mailman is supposed to be long-time stable - or however you call it - we decided that we should stick to the latest stable version right away. For this reason you're required to install Django 1.3+ which is descriped on their Website. (https://www.djangoproject.com/download/) - -.. note:: - Please be Aware that it's not recommended to run both 1.2 and 1.3 at the same time - -In Django you've got 3 different levels of data. -- Django Installation Files -- Django Site -- Django Apps -usually you don't see the Installation as it's hidden somewhere within the System and the Apps are simply included into The Site Directory. -As we wanted to have the possibility to include the App into any Django Site which might already exist we decided to keep Site and App seperated. - -During GSoC we've used different branches for this: -- lp:mailmanwebgsoc2011 -- lp:mailmanwebgsoc2011/django-site-0.1 - -Django Site Installation ------------------------- - -We've created this branch for quick development - everyone is free to use his own Django site, but this one already includes a couple of modifications we've made that will allow running the Development Server just a few seconds after Branching both Site and App. - -As far as I know at the moment we've made the following alignments: (All of these are in the settings.py file of the Django Site) - - REST_SERVER = 'localhost:8001' - API_USER = 'restadmin' - API_PASS = 'restpass' - - .. note:: - These are the default values used by the Mailman Client we've installed earlier. Feel free to modify the password and username if you need to. - -MAILMAN_TEST_BINDIR = '/home/benste/Projects/Gsoc_mailman/mailman-3.0.0a7/bin' -#/home/florian/Development/mailman/bin' - - .. note:: Running the test modules requires to launch a special version of mailman with it's own testing DB otherwise you'd destroy you're sites content during testing. This Path needs to point to YOUR own installation of mailman. - -MAILMAN_THEME = "default" - - .. note:: - We decided to allow simple Appearance Modifications, to use a custom CSS you could simply add a Directory within the media directory of the app and Link it's name here. All HTML Pages will use the Styles from the Directory mentioned in here - -PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) -MEDIA_ROOT = os.path.join(os.path.split(PROJECT_PATH)[0], "mailman_django/media/mailman_django/") - .. note:: - Absolute path to the directory that holds media. - Example: "/home/media/media.lawrence.com/" - -MEDIA_URL = '/mailman_media/' - - .. note:: - URL that handles the media served from MEDIA_ROOT. Make sure to use a trailing slash if there is a path component (optional in other cases).Examples: "http://media.lawrence.com", "http://example.com/media/" - -AUTHENTICATION_BACKENDS = ( - 'mailman_django.auth.restbackend.RESTBackend', - 'django.contrib.auth.backends.ModelBackend' - ) - - .. note:: - This creates a connection in between Djangos Login and Permission Decorators which we use for authentification and a custom Backend which we created in Preparation to work together with the REST API or an upcoming Middleware. - You need to keep the Django one for testing fallback. - -TEMPLATE_CONTEXT_PROCESSORS=( - "django.contrib.auth.context_processors.auth", - "django.core.context_processors.debug", - "django.core.context_processors.i18n", - "django.core.context_processors.media", - "django.core.context_processors.csrf", - "django.contrib.messages.context_processors.messages", - "mailman_django.context_processors.lists_of_domain", - "mailman_django.context_processors.render_MAILMAN_THEME", - "mailman_django.context_processors.extend_ajax" - - .. note:: - We're using Context Processors to easily render value which we need in nearly every view. - -ROOT_URLCONF = 'mailman_django.urls' - - .. note:: - This is where our URL Config is - if you run your own site with other Apps as well you might want to adjust this to your urls.py which includes our file. - -TEMPLATE_DIRS = ( - os.path.join(PROJECT_PATH, "mailman_django/templates"), - - .. note:: - Adds our own Templates - -INSTALLED_APPS = ( - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.sites', - 'django.contrib.admin', - 'mailman_django', - - .. note:: - Makes sure that Django knows about our directory as an App and creates needed Tables () when running - - .. code-block:: bash - - $ python manage.py syncdb - -Now that you know about all these you might start the development server. As usual in Django this is done by running - - .. code-block:: bash - - $ python manage.py runserver - -within the Django Site Directory - as usual the default address is localhost:8000 -Of course it will only be able to start once our app is in place as well. - -Django Application ------------------- -First get the files, and make sure you paste them into your Project directory and adjust it's name to the appropriate configuration you've made earlier in the Django Site. Remeber our default is mailman_django - - .. code-block:: bash - - $ bzr branch lp:mailmanwebgsoc2011 - -.. note:: - We've tested Revision 172 - -.. note:: - We're planning to ease up installation by creating an egg