This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@app.route('/doc/<docId>') | |
def getDoc(docId): | |
userDoc = UserDocument.objects(id=docId).first() # I use MongoEngine to query my mongodb instance | |
if not userDoc: | |
return abort(404) | |
desiredWidthStr = request.args.get('width') | |
desiredHeightStr = request.args.get('height') | |
if desiredWidthStr or desiredHeightStr: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.activeandroid.serializer; | |
import org.joda.time.DateTime; | |
public final class JodaDateTimeSerializer extends TypeSerializer { | |
public Class<?> getDeserializedType() { | |
return DateTime.class; | |
} | |
public Class<?> getSerializedType() { |