Example #1
0
def profile_pins(uname):
    user = User.objects.get(uname=uname)
    pins = Pin.objects(pinner=user.to_dbref()).order_by('-date')
    valid_pins = getValidBrowserPins(pins, current_user)
    return render_template('profilepins.html', pins=valid_pins, upform=UploadForm(), user=user)
Example #2
0
def favorites(uname):
    user = User.objects.get(uname=uname)
    pins = Pin.objects(favs__contains=user.to_dbref())
    valid_pins = getValidBrowserPins(pins, current_user)
    return render_template('profilepins.html', pins=valid_pins, upform=UploadForm(), user=user)
Example #3
0
def index():
    upform = UploadForm()
    pins = Pin.objects.order_by('-date')
    valid_pins = getValidBrowserPins(pins, current_user)
    return render_template("index.html", pins=valid_pins, upform=upform)