[web2py] CSS URL Helper
How do I use the URL helper in a CSS stylesheet that I reference in the landing page. The CSS example that I have to add a background is the following: /*header style*/.header{ background-image: url('../images/headerback.jpg'); background-attachment: fixed; background-size: cover; background-position: center;} Can I use the URL helper here? I store my css code in a seperate file -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/9b79d796-698c-45d7-96e3-75f913ab58e3%40googlegroups.com.
[web2py] passing value from select/option to div and controller
I'm able to pass a value from the select/option to div but I can't seem to get a way of sending the same value to controller(then database). I have tried different AJAX methods but they seem not to pass the variables to controller. How do I get it to be done? So far this is my code: def insert_task(): """an ajax callback that returns a """ task_name = request.vars.name pp = [] pp.append(task_name)#db.mylist.insert(task=task_name) return pp Below 39 yrs 40 to 64 yrs Above 65 yrs Non-Fiction Fiction Childrens Biography //$('#ddlViewBy option:selected').text() $('#ddlViewBy').change(function(){ alert($(this).val()); $("#target").text($(this).val());//working }); -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/026e82e6-c245-4146-8f5a-6cb27187c372%40googlegroups.com.
[web2py] email template framework
Nice https://mjml.io/ django is using it ... https://github.com/liminspace/django-mjml -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/CAEM0BxOCkeP7zoyJnQi5szJqz7_AxquKQOiHfPu_Uno74GWKmg%40mail.gmail.com.
[web2py] RestAPI: how to restrict query results to data belonging to logged in user?
Hello, How can I restrict access via RestAPI for the user such that they can only get their own records (those that have the field user_id matching their user id)? For example, I have a a table named 'collections' that has a 'user_id' field, and I want my users to get only the collections that they created. If they try to get someone else's collection, then they should get a 'not authorized' response. As an extension, I would also like to allow for users to be able to get someone else's collection if its status is equal to 'PUBLIC'. Here's the definition of my collections table: db.define_table('collections', Field('user_id', db.auth_user, notnull=True), Field('language_code', length="3", requires=IS_IN_DB(db, 'language.code', db.language._format), notnull=True), Field('title', length=512, notnull=True), Field('description', 'text', notnull=False), Field('privacy', length=50, requires=IS_IN_SET(privacy_set), notnull=True, default='PRIVATE'), Field('level',length=10, requires=IS_IN_SET(level_set), notnull=True, default='NONE')) Thanks, -- Alexei -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/22947111-cd14-46ed-b3d1-242721097bea%40googlegroups.com.