aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/conf.py4
-rw-r--r--docs/hackinghowto.rst5
-rwxr-xr-xmaketarball.sh57
-rw-r--r--mediagoblin/db/models.py16
-rw-r--r--mediagoblin/edit/forms.py3
-rw-r--r--mediagoblin/edit/views.py4
-rw-r--r--setup.py2
7 files changed, 78 insertions, 13 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 0e75a617..6c64cdda 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -48,9 +48,9 @@ copyright = u'2011, Free Software Foundation, Inc and contributors'
# built documents.
#
# The short X.Y version.
-version = '0.0.2'
+version = '0.0.3'
# The full version, including alpha/beta/rc tags.
-release = '0.0.2'
+release = '0.0.3'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/docs/hackinghowto.rst b/docs/hackinghowto.rst
index 08b228f1..914a5135 100644
--- a/docs/hackinghowto.rst
+++ b/docs/hackinghowto.rst
@@ -57,6 +57,11 @@ requirements::
sudo apt-get install mongodb git-core python python-dev \
python-lxml
+On Fedora::
+
+ yum install mongodb-server python-paste-deploy python-paste-script \
+ git-core python python-devel
+
.. YouCanHelp::
If you have instructions for other GNU/Linux distributions to set
diff --git a/maketarball.sh b/maketarball.sh
new file mode 100755
index 00000000..2ee78016
--- /dev/null
+++ b/maketarball.sh
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+# usage: maketarball
+# maketarball <tag>
+#
+# With no arguments, this creates a source tarball from git master with a
+# filename based on today's date.
+#
+# With a <tag> argument, this creates a tarball of the tag.
+#
+# Examples:
+#
+# ./maketarball
+# ./maketarball v0.0.2
+
+NOWDATE=`date "+%Y-%m-%d"`
+
+if [ -z "$1" ]
+then
+ REVISH=master
+ PREFIX="$NOWDATE-$REVISH"
+else
+ REVISH=$1
+ PREFIX="$REVISH"
+fi
+
+# convert PREFIX to all lowercase.
+# nix the v from tag names.
+PREFIX=`echo "$PREFIX" | tr '[A-Z]' '[a-z]' | sed s/v//`
+
+echo "== REVISH $REVISH"
+echo "== PREFIX $PREFIX"
+
+echo ""
+
+echo "generating archive...."
+git archive \
+ --format=tar \
+ --prefix=mediagoblin-$PREFIX/ \
+ $REVISH > mediagoblin-$PREFIX.tar
+
+if [[ $? -ne 0 ]]
+then
+ echo "git archive command failed. See above text for reason."
+ if [[ -e mediagoblin-$PREFIX.tar ]]
+ then
+ rm mediagoblin-$PREFIX.tar
+ fi
+ exit 1;
+fi
+
+echo "compressing...."
+gzip mediagoblin-$PREFIX.tar
+
+echo "archive at mediagoblin-$PREFIX.tar.gz"
+
+echo "done." \ No newline at end of file
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py
index e764d368..2b7933a4 100644
--- a/mediagoblin/db/models.py
+++ b/mediagoblin/db/models.py
@@ -147,31 +147,33 @@ class MediaEntry(Document):
"""
Provide a url to the previous entry from this user, if there is one
"""
- cursor = self.db.MediaEntry.find({'_id' : {"$gt": self['_id']},
- 'uploader': self['uploader']}).sort(
+ cursor = self.db.MediaEntry.find({'_id' : {"$lt": self['_id']},
+ 'uploader': self['uploader'],
+ 'state': 'processed'}).sort(
'_id', ASCENDING).limit(1)
-
if cursor.count():
return urlgen('mediagoblin.user_pages.media_home',
user=self.uploader()['username'],
- media=unicode(cursor[0]['_id']))
+ media=unicode(cursor[0]['slug']))
def url_to_next(self, urlgen):
"""
Provide a url to the next entry from this user, if there is one
"""
- cursor = self.db.MediaEntry.find({'_id' : {"$lt": self['_id']},
- 'uploader': self['uploader']}).sort(
+ cursor = self.db.MediaEntry.find({'_id' : {"$gt": self['_id']},
+ 'uploader': self['uploader'],
+ 'state': 'processed'}).sort(
'_id', DESCENDING).limit(1)
if cursor.count():
return urlgen('mediagoblin.user_pages.media_home',
user=self.uploader()['username'],
- media=unicode(cursor[0]['_id']))
+ media=unicode(cursor[0]['slug']))
def uploader(self):
return self.db.User.find_one({'_id': self['uploader']})
+
class MediaComment(Document):
__collection__ = 'media_comments'
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py
index 2efdb9e4..d5e7f0a9 100644
--- a/mediagoblin/edit/forms.py
+++ b/mediagoblin/edit/forms.py
@@ -31,4 +31,5 @@ class EditProfileForm(wtforms.Form):
[wtforms.validators.Length(min=0, max=500)])
url = wtforms.TextField(
'Website',
- [wtforms.validators.URL(message='Improperly formed URL')])
+ [wtforms.validators.Optional(),
+ wtforms.validators.URL(message='Improperly formed URL')])
diff --git a/mediagoblin/edit/views.py b/mediagoblin/edit/views.py
index e064a9c3..a3326b2d 100644
--- a/mediagoblin/edit/views.py
+++ b/mediagoblin/edit/views.py
@@ -106,8 +106,8 @@ def edit_profile(request):
messages.add_message(request,
messages.SUCCESS,
'Profile edited!')
- return redirect(request,
- "mediagoblin.edit.profile",
+ return redirect(request,
+ 'mediagoblin.user_pages.user_home',
username=edit_username)
return render_to_response(
diff --git a/setup.py b/setup.py
index 2a007f4e..799f00d8 100644
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,7 @@ from setuptools import setup, find_packages
setup(
name = "mediagoblin",
- version = "0.0.2",
+ version = "0.0.3",
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
zip_safe=False,
# scripts and dependencies