Skip to content

Commit

Permalink
[merge] from feature-1141-moderated-edits-ajax.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Read committed Jun 23, 2011
2 parents 82f8635 + d72570e commit 7373db5
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 79 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
CKAN CHANGELOG
++++++++++++++

v1.4.2 2011-XX-XX
=================
Major:
* Packages revisions can be marked as 'moderated' (#1141)
* Viewing of a package at any revision (#1141)


v1.4.1 2011-XX-XX
=================
Minor:
Expand All @@ -13,6 +20,7 @@ Minor:
Bug fixes
* Duplicate authorization roles were difficult to delete (#1083)


v1.4 2011-05-19
===============
Major:
Expand Down
4 changes: 2 additions & 2 deletions ckan/controllers/group_formalchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def new(self):
for extension in self.extensions:
extension.create(group)
model.repo.commit_and_remove()
h.redirect_to(action='read', id=c.groupname)
h.redirect_to(controller='group', action='read', id=c.groupname)

if request.params:
data = forms.edit_group_dict(ckan.forms.get_group_dict(), request.params)
Expand Down Expand Up @@ -122,4 +122,4 @@ def edit(self, id=None): # allow id=None to allow posting
for extension in self.extensions:
extension.edit(group)
model.repo.commit_and_remove()
h.redirect_to(action='read', id=c.groupname)
h.redirect_to(controller='group', action='read', id=c.groupname)
3 changes: 1 addition & 2 deletions ckan/controllers/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ def edit(self, id=None):
c.user_fullname = request.params.getone('fullname')
c.user_email = request.params.getone('email')
return render('user/edit.html')

user.about = request.params.getone('about')
user.about = about
user.fullname = request.params.getone('fullname')
user.email = request.params.getone('email')
try:
Expand Down
2 changes: 1 addition & 1 deletion ckan/model/authorization_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
authorization_group_table = Table('authorization_group', metadata,
Column('id', UnicodeText, primary_key=True, default=make_uuid),
Column('name', UnicodeText),
Column('created', DateTime, default=datetime.now),
Column('created', DateTime, default=datetime.datetime.now),
)

authorization_group_user_table = Table('authorization_group_user', metadata,
Expand Down
4 changes: 3 additions & 1 deletion ckan/model/group.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import datetime

from meta import *
from core import *
from sqlalchemy.orm import eagerload_all
Expand Down Expand Up @@ -26,7 +28,7 @@
Column('name', UnicodeText, nullable=False, unique=True),
Column('title', UnicodeText),
Column('description', UnicodeText),
Column('created', DateTime, default=datetime.now),
Column('created', DateTime, default=datetime.datetime.now),
)

vdm.sqlalchemy.make_table_stateful(group_table)
Expand Down
6 changes: 3 additions & 3 deletions ckan/model/meta.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from datetime import datetime
import datetime
"""SQLAlchemy Metadata and Session object"""
from sqlalchemy import MetaData, __version__ as sqav
from sqlalchemy.orm import scoped_session, sessionmaker
Expand Down Expand Up @@ -51,7 +51,7 @@ def before_commit(self, session):

## when a normal active transaction happens
if 'pending' not in obj.state:
revision.approved_timestamp = datetime.now()
revision.approved_timestamp = datetime.datetime.now()
old = session.query(revision_cls).filter_by(
current='1',
id = obj.id
Expand All @@ -61,7 +61,7 @@ def before_commit(self, session):
session.add(old)

q = session.query(revision_cls)
q = q.filter_by(expired_timestamp=datetime(9999, 12, 31), id=obj.id)
q = q.filter_by(expired_timestamp=datetime.datetime(9999, 12, 31), id=obj.id)
results = q.all()

for rev_obj in results:
Expand Down
4 changes: 3 additions & 1 deletion ckan/model/rating.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import datetime

from meta import *
from core import *
from package import *
Expand All @@ -12,7 +14,7 @@
Column('user_ip_address', UnicodeText), # alternative to user_id if not logged in
Column('package_id', UnicodeText, ForeignKey('package.id')),
Column('rating', Float),
Column('created', DateTime, default=datetime.now),
Column('created', DateTime, default=datetime.datetime.now),
)

class Rating(DomainObject):
Expand Down
2 changes: 1 addition & 1 deletion ckan/model/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Column('fullname', UnicodeText),
Column('email', UnicodeText),
Column('apikey', UnicodeText, default=make_uuid),
Column('created', DateTime, default=datetime.now),
Column('created', DateTime, default=datetime.datetime.now),
Column('about', UnicodeText),
)

Expand Down
53 changes: 0 additions & 53 deletions doc/design.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Contents:
:maxdepth: 2

README
design
deployment
configuration
paster
Expand Down
14 changes: 0 additions & 14 deletions doc/kforge/index.html

This file was deleted.

0 comments on commit 7373db5

Please sign in to comment.