Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

ripped out django-revisions support for now

  • Loading branch information...
commit cdf5e4bcbeb31464fc2590f55df14810e739a954 1 parent ea490e9
Trey Smith trey0 authored

Showing 1 changed file with 5 additions and 35 deletions. Show diff stats Hide diff stats

  1. +5 35 geocamMemo/models.py
40 geocamMemo/models.py
@@ -6,28 +6,11 @@
6 6
7 7 from django.db import models
8 8 from django.contrib.auth.models import User
9   -from revisions.models import VersionedModel
10   -from revisions.shortcuts import VersionedModel as VersionedModelShortcuts
11   -import revisions
12 9 import json
13 10 import time, datetime
14   -from geocamMemo import authentication
  11 +# from geocamMemo import authentication
15 12
16   -class GeocamMessage(revisions.models.VersionedModel):
17   - """ This is the abstract data model for geocam messages
18   -
19   - Some of the Versioned Model API:
20   - VersionedModel.get_latest_revision()
21   - VersionedModel.get_revisions()
22   - VersionedModel.make_current_revision()
23   - VersionedModel.revert_to(criterion)
24   - VersionedModel.save(new_revision=True, *vargs, **kwargs)
25   - VersionedModel.show_diff_to(to, field)
26   - complete API and docs are here:
27   - http://stdbrouw.github.com/django-revisions/
28   -
29   - """
30   -
  13 +class GeocamMessage(models.Model):
31 14 class Meta:
32 15 abstract = True
33 16
@@ -63,19 +46,6 @@ def has_geolocation(self):
63 46 pass
64 47
65 48 class MemoMessage(GeocamMessage):
66   - """ This is the data model for Memo application messages
67   -
68   - Some of the Versioned Model API:
69   - VersionedModel.get_latest_revision()
70   - VersionedModel.get_revisions()
71   - VersionedModel.make_current_revision()
72   - VersionedModel.revert_to(criterion)
73   - VersionedModel.save(new_revision=True, *vargs, **kwargs)
74   - VersionedModel.show_diff_to(to, field)
75   - complete API and docs are here:
76   - http://stdbrouw.github.com/django-revisions/
77   -
78   - """
79 49 def __unicode__(self):
80 50 return "Memo from %s on %s: %s" % (self.author.username, self.content_timestamp, self.content)
81 51
@@ -118,11 +88,11 @@ def getMessages(author=None):
118 88 """
119 89
120 90 if (author is None):
121   - # all messages are displayed (latest revisions)
122   - messages = MemoMessage.latest.all()
  91 + # all messages are displayed
  92 + messages = MemoMessage.objects.all()
123 93 else:
124 94 # messages displayed are from author:
125   - messages = MemoMessage.latest.filter(author__username=author.username)
  95 + messages = MemoMessage.objects.filter(author__username=author.username)
126 96 return messages.order_by('-content_timestamp')
127 97
128 98 def get_user_string(user):

0 comments on commit cdf5e4b

Please sign in to comment.
Something went wrong with that request. Please try again.