Browse files

final bits for 0.2.12 and PEP-8 stuff

  • Loading branch information...
1 parent d42aada commit 316a97f68554a3cc184bbfe325e9a2017a134570 @pydanny pydanny committed Apr 11, 2012
Showing with 22 additions and 15 deletions.
  1. +2 −0 CHANGELOG
  2. +4 −4 README.rst
  3. +1 −1 docs/conf.py
  4. +1 −1 examples/blog/urls.py
  5. +1 −1 mongonaut/__init__.py
  6. +7 −5 mongonaut/tests/models.py
  7. +3 −2 mongonaut/tests/test_views.py
  8. +3 −1 mongonaut/tests/utils.py
View
2 CHANGELOG
@@ -2,6 +2,8 @@
CHANGELOG
=========
+# 0.2.12 Bump to mongoengine 0.6.2, PEP-8, and fixing the is_authenticated problem in default permission controls.
+
# 0.2.11 Change style over to Twitter Bootstrap 2.0.0, Add templates to manifest
# 0.2.10 Proper Reference field saves, more permission fixes
View
8 README.rst
@@ -2,8 +2,8 @@
django-mongonaut
================
:Info: An introspective interface for Django and MongoDB.
-:Version: 0.2.11
-:Author: Daniel Greenfeld (http://github.com/pydanny)
+:Version: 0.2.12
+:Author: Daniel Greenfeld (http://pydanny.com)
About
=====
@@ -30,11 +30,11 @@ Get MongoDB::
Get mongoengine (and pymongo):
- pip install mongoengine==0.5.2
+ pip install mongoengine==0.6.2
Get the code::
- pip install django-mongonaut==0.2.11
+ pip install django-mongonaut==0.2.12
Install the dependency in your settings.py::
View
2 docs/conf.py
@@ -50,7 +50,7 @@
# The short X.Y version.
version = '0.2'
# The full version, including alpha/beta/rc tags.
-release = '0.2.11'
+release = '0.2.12'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
View
2 examples/blog/urls.py
@@ -3,5 +3,5 @@
urlpatterns = patterns('',
url(r'^mongonaut/', include('mongonaut.urls')),
- url(r'^', include('articles.urls')),
+ url(r'^', include('articles.urls')),
)
View
2 mongonaut/__init__.py
@@ -1,6 +1,6 @@
__author__ = 'Daniel Greenfeld'
-VERSION = (0, 2, 11)
+VERSION = (0, 2, 12)
def get_version():
View
12 mongonaut/tests/models.py
@@ -7,29 +7,31 @@
from mongoengine import ReferenceField
from mongoengine import StringField
+
class User(Document):
email = StringField(required=True, max_length=50)
first_name = StringField(max_length=50)
last_name = StringField(max_length=50)
+
class EmbeddedUser(EmbeddedDocument):
email = StringField(required=True, max_length=50)
first_name = StringField(max_length=50)
last_name = StringField(max_length=50)
-
+
class Comment(EmbeddedDocument):
content = StringField()
- name = StringField(max_length=120)
+ name = StringField(max_length=120)
+
class Post(Document):
# See Post.title.max_length to make validation better!
title = StringField(max_length=120, required=True)
author = ReferenceField(User)
- content = StringField()
+ content = StringField()
tags = ListField(StringField(max_length=30))
- comments = ListField(EmbeddedDocumentField(Comment))
+ comments = ListField(EmbeddedDocumentField(Comment))
pub_date = DateTimeField()
published = BooleanField()
creator = EmbeddedDocumentField(EmbeddedUser) # for testing purposes
-
View
5 mongonaut/tests/test_views.py
@@ -1,5 +1,6 @@
from mongonaut.utils import MongoTestCase
+
class TestViews(MongoTestCase):
-
- pass
+
+ pass
View
4 mongonaut/tests/utils.py
@@ -9,11 +9,13 @@
from mongoengine import connect
+
class MongoTestCase(TestCase):
"""
TestCase class that clear the collection between the tests
"""
db_name = 'test_%s' % settings.MONGO_DATABASE_NAME
+
def __init__(self, methodName='runtest'):
self.db = connect(self.db_name)
super(MongoTestCase, self).__init__(methodName)
@@ -23,4 +25,4 @@ def _post_teardown(self):
for collection in self.db.collection_names():
if collection == 'system.indexes':
continue
- self.db.drop_collection(collection)
+ self.db.drop_collection(collection)

0 comments on commit 316a97f

Please sign in to comment.