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)
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)
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)