Here's my code I need help with.

https://gist.github.com/anonymous/16c7dd14185c9b5ce2b4

I can uncomment line 35 and comment line 36 and get it to work., but I need
line 36 to work.  I try different avenues and get the same build error and
nothing else.  This is the only time I have had a serious problem with
python error messages, but I am young in this.


On Wed, Aug 20, 2014 at 11:08 AM, Daniel <[email protected]> wrote:

> Eric,
>
> I tried to google what I want to do, but I never was able to find what I
> was looking for.  That's why I posted here.
>
> Joshua,
>
> The code you posted is close to what I am looking for.  Here are the
> tweeks that need to be addressed:
> This code is in an app.py and want to route the user.  I am currently
> using the line
>
>     return redirect(url_for('principal'))
>
>     and the function principal has two decorators:
>
>         @app.route('/principal')
>         @principal_required(user_object)
>         def principal(user_id, school_id)
>
>
> I'll post more specifics tonight.
>
>
> On Tue, Aug 19, 2014 at 9:47 PM, Joshua Elliott <[email protected]> wrote:
>
>> On Tue, Aug 19, 2014 at 9:05 PM, Daniel <[email protected]> wrote:
>>
>> > I have a flask application I am writing. I need to know how to pass a
>> > variable to the decorator of a function. The decorator will determine
>> if a
>> > user is authorized to view a page. The variable I would use would have
>> the
>> > user id and role. Can anyone help with this?
>> >
>>
>> Here's an example that does something like you're talking about:
>>
>> https://gist.github.com/jcelliott/ec23ef0948dbc834e5bb
>>
>> /*
>> PLUG: http://plug.org, #utah on irc.freenode.net
>> Unsubscribe: http://plug.org/mailman/options/plug
>> Don't fear the penguin.
>> */
>>
>
>

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to