Questions tagged [web2py]

1

votes
0

answer
72

Views

Cascading / dependent drop down list in web2py

I'm having a few problems trying to create a cascading drop down list in web2py. I've followed this recipe, however, It is quite difficult for me (a beginner) to suss out the logic behind it. http://www.web2pyslices.com/slice/show/1526/cascading-drop-down-lists-with-ajax-2 i've managed to adapt it...
Matthew J Watts
1

votes
0

answer
65

Views

web2py autocomplete widget not using bootstrap3 style

I tried to use the autocomplete widget as suggested by Anthony at web2py autocomplete widget not 'CSS-friendly'?, but could not succeed. My models: db.define_table('bank', Field('category', 'string', default='BANK'), Field('full_name', 'string', required=True, label='Name'), format='%(full_name)s...
Krishnan Trikkadeeri
1

votes
1

answer
21

Views

Retrieve user login e-mail and use it to pre-populate submission form

Using a web2py company/client app, I have an access-restricted section (@auth.requires_membership) - the user can login using their e-mail/password combination which gives access to a submission form. That form has an e-mail field, that I would like to have pre-populated (and not writable) with the...
arutan
1

votes
0

answer
40

Views

how to use jenkins and devops for .net and python development work

We are initial stage of bringing devops into our daily activities. Now we are workig on .net and pthon coding. So we have to plan for continuous delivery on our activities. In the first scenario for python development works, we are using web2py now. So developers can directly access the python files...
saran
1

votes
0

answer
25

Views

Are there any jenkins plugins available for developers work easiness (a replacement for web2py)

We are looking for Devops CD process for our python developers work, where currently they are writing and testing codes using web2py. If we use jenkins, how can we get a better option for the replacement for web2y? Or can we integrate web2py with jenkisn for completing the devops cycle?
saran
1

votes
0

answer
32

Views

Install web2py on domain hosting

How can I deploy or install web2py on domain hosting? Each time i try to run the command python web2py.py, I get: please visit: http://127.0.0.1:8000/ use 'kill -SIGTERM 38820' to shutdown the web2py server ERROR:Rocket.Errors.Port8000:Socket 127.0.0.1:8000 in use by other process and it won't shar...
FRANK OJAMBO
1

votes
1

answer
47

Views

web2py insert with variable table and field name e.g. with dict

Is there a way to handle table name and field name at run time ? I have found references to an insert method that takes a dict as argument But assuming rd is a dict with 10 entries, key = name of the field, value = value to be inserted, the following code will fail db.OrdersFull.insert(rd) With erro...
Christophe
1

votes
1

answer
21

Views

smartgrid validation on non-writable field

I have two linked tables (car_make,car_model). db.define_table('car_make', Field('id', type='id', notnull=True), Field('name',type='string', notnull=True, unique=True), format='%(name)s' ) db.define_table('car_model', Field('id',type='id', notnull=True), Field('company', 'reference car_make', notnu...
dhotch
1

votes
1

answer
880

Views

web2py - translate login page

How can translate login page of my system by using this url: http://ip:8000/init/default/user/login display by default two text boxes username and password how can i translate these labels. Thanks in Advance
Neveen
1

votes
1

answer
265

Views

web2py: how to enable “request_reset_password” function?

I'm new to web2py but eager to learn it fast. I try to enable 'request_reset_passwor' function but every time I enter this page: http://127.0.0.1:8000/project/default/user/request_reset_password I receive message that the function is disabled. Can you please tell me what should I do and where to...
elfuego1
1

votes
1

answer
481

Views

input time in web2py

I want to take input time to complete a task in format no. of days,hours in web2py. Is there any defined field,type for this in SQLField. time module in python allows only max 24 hours time.
sahil
1

votes
1

answer
172

Views

Timeout loading application on GAE using web2py

I am uploading an app to GAE. Through some experimentation I've found that if I don't include wsgihandler.py, the app loads very slowly. It feels like it's looking for this file and them timing out. Besides the slow loading, everything works perfectly without wsgihandler.py, so I want to know if...
Charles L.
1

votes
1

answer
2.3k

Views

How can I create “upload” files with web2py

I have an app running on web2py. For this app I want to store a lot of files to a database for each user, which they can either upload from their own computer or they can create online and save. These files can be either text or binary files, but if they are created in my app, they will be text....
Charles L.
1

votes
2

answer
1.3k

Views

Upload a file with web2py on Google App Engine

I have a problem deploying my application written in web2py on Google App Engine. Everything works well on localhost, but on GAE I cannot access the content of an uploaded file. When I check the request.vars.my_upload_field var on localhost, I get: FieldStorage('upload_field', 'my_file.txt', 'File c...
Thomas
1

votes
1

answer
802

Views

in web2py, can I get newlines in the output of HTML helpers?

I am making a table with web2py HTML helpers. My code is based on the example from the web2py book: >>> table = [['a', 'b'], ['c', 'd']] >>> print TABLE(TR(*table[0]), TR(*table[1])) abcd I have quite a large table, but this approach places all output on one big line. For readability of the HTML, I...
Hugo Ideler
1

votes
1

answer
989

Views

global object access across the session in web2py?

I'm new to webdev, these days plan for writing a boradgame with web2py. When start to coding, I found that I can't use global variables easily. for demo purpose, I want a python list object access by many players, I use sqlite to make it work. the database, (using DAL('sqlite:memory:') won't work),...
Gohan
1

votes
1

answer
480

Views

Using xmlrpc in web2py for command line interface for a web application

I have an application in web2py. To create the command line interface of the gui (web-interface), I want to use xmlrpc service. For example if I have following function : @auth.requires_login def example(): temp = request.args[0] //do something on temp return dict(temp=temp) How can I call this func...
w2lame
1

votes
1

answer
415

Views

appending flash message in json , web2py

I am querying web2py using json. I want to append the flash message in the json object that is returned. By default web2py makes json object only of variables used in the page. One way to go about this is manually append flash message in all the dict objects that i return which may not be feasible a...
Jatin Kumar
1

votes
1

answer
651

Views

Multiple Instances of a table in a web2py form

Trying to make a poll application in web2py. Model db.define_table('t_query', Field('f_content', type='text', requires=IS_NOT_EMPTY(), label=T('Content')), SQLField('is_active',db.auth_user,writable=False,readable=False), auth.signature, migrate=settings.migrate) db.define_table('t_option', Field(...
abel
1

votes
1

answer
400

Views

Unable to write to AppEngine DataStore using web2py's DAL

I've just started using web2py with Google AppEngine for an app of mine. For some reason, I'm unable to save/retrieve data using the DAL. Here's the code I'm using: At the end of db.py: from aeoid import middleware from aeoid import users import json db.define_table('files', db.Field('name', 'text'...
Sathvik
1

votes
1

answer
596

Views

web2py ajax call fails from pages other than index

I am using the web2py ajax function, like this: In index.html {{=INPUT(_name='total_buy', _onkeyup= 'ajax('key',['total_buy'], ':eval')')}} and in default.py def key(): return 'jQuery('#target').html('%s');' % repr(float(request.vars.total_buy)) This works perfectly. When a number is typed into the...
ravenspoint
1

votes
1

answer
1.2k

Views

Is it possible to use web2py language in javascript file (.js)?

I'm trying to use AJAX with web2py language but I have a problem My code is: javascript $(document).ready(function(){ $('.className').click(function(){ jQuery.ajax({ type:'POST', url:'getName', data:{ itemName:'a' }, timeout: 20000, success: function(msg) { alert(msg); }, error: function(objAJAXReq...
Web2py user
1

votes
2

answer
1.8k

Views

Delete List Item From Database

This is probably a simple question, I have a form that you put in a comment it redirects to another page upon submit and displays all comments in a list. I am wondering how i can add an erase button to each list item to remove that particular comment. Thank you in advance, db.define_table('dis...
Chris Hawkes
1

votes
1

answer
359

Views

Special select widget returning form errors when submitted (“no data”)

I need some help to have a widget work correctly in a web2py app. By the way, once corrected, I think it could be useful to other users... I built a SELECT widget to expose regions and their sub-regions ('departement') so that the user may have the choice. For instance: a region A is divided into d...
Dominique
1

votes
1

answer
60

Views

Checkboxes disappearing when uploading to Google App Engine

I have written a controller to take input from the form containing a list of options. The options have to be selected using checkboxes. I have successfully tested the code on my local machine. But when uploaded to the app engine, the webpage is not displaying the checkbox fields. It is not displayin...
athinker
1

votes
1

answer
1.7k

Views

How do I reset my Web2Py application?

I deleted all the directories in my Web2Py application except the controllers, models, views and static in an attempt to reset my app, since I had made some changes to my database structure and thought migrations would be too much trouble to take for a new app with a near-empty database. Now I'm get...
Sathvik
1

votes
1

answer
1.5k

Views

web2py how to make a list:reference of an other table in db.py

I have an app tag and an app image. How do I make a reference from image to the app tag database? tag app db.py : db.define_table('Tag', Field('Name', unique=True), format = '%(Name)s') image app db.py : db.define_table('Image', Field('Nom'), Field('Date_Creation',date), Field('Tag','list:reference...
user462794
1

votes
1

answer
1.3k

Views

web2py control form, show fields when select option

I have a table contents many fields db.define_table('i2l_templates', Field('id','id', represent=lambda id:SPAN(A(T('View'),_href=URL('view_template',args=id)),' | ', A(T('Edit'),_href=URL('edit_template',args=id)))), Field('user_id', db.auth_user, default=auth.user_id, writable=False,readable=False,...
ElTero
1

votes
1

answer
1.1k

Views

Retrieving POST data from Web2py to local HTML file

I've been having some heavy jquery cross-domain issues, so I've been trying to get around that through web2py. I'm sending POST data from a local HTML file to my web2py server. Web2py is then making a python POST to a second server (which solves the cross-domain issue) and gets the expected respons...
unknown_varmit
1

votes
1

answer
591

Views

AJAX Form submission with CRUD

Is it possible to validate CRUD form fields using ajax without submitting the form in web2py? I have gone through the web2py online doc and have seen this link: http://web2py.com/books/default/chapter/29/11#Ajax-form-submission So we may do it using custom html. But I want to do it using CRUD.
rahulserver
1

votes
1

answer
456

Views

Query or Expression for excluding certain values from DAL selection

I'm trying to exclude posts which have a tag named meta from my selection, by: meta_id = db(db.tags.name == 'meta').select().first().id not_meta = ~db.posts.tags.contains(meta_id) posts=db(db.posts).select(not_meta) But those posts still show up in my selection. What is the right way to write that e...
Sathvik
1

votes
1

answer
924

Views

Web2py Query Legacy Database

I have a legacy database called my_legacy_db which is separate from the normal db. my_legacy_db users - email - username - name So cliff, your first part would work to generate field names and put everything in a dict to build the query's. The problem is when I do this query: db().select(my_legacy_d...
Codygman
1

votes
1

answer
505

Views

Understanding shell setup script errors

I'm trying to run this web2py install script on a clean CentOS 6 install, and am getting the following set of errors: checkmodule: loading policy configuration from httpd.te httpd.te:1:ERROR 'Building a policy module, but no module specification found. ' at token 'EOF' on line 1: checkmodule: erro...
Yarin
1

votes
1

answer
4.5k

Views

web2py - Dropdown menu

I'm trying to have a dropdown menu for the user to select the database table. I have defined few tables in db.py and I want the user the to select a particular table from a dropdown menu and insert entries. Right now I use SQLFORM: def index(): form=SQLFORM(db.selectedtable) #want to change the tab...
madu
1

votes
1

answer
2.2k

Views

upload files to ec2 from local using scp

I am using scp to upload files from local to ec2, and I got the permission error. Permission denied (publickey). lost connection How do i fix this?
Jensen
1

votes
3

answer
351

Views

Module throws name error when imported from package

I'm trying to import a module that contains a single line: import logging, into my web2py project. When I try to import the module from within a package called mymodules, I get a name 'logging' is not defined error, but When I take the module out of the package and import it directly, it works fine...
Yarin
1

votes
1

answer
694

Views

Web2py ajax ':eval' action is not returning HTML functions

In my ajax function call am using target ':eval' to do some actions from controller. And my controller function returns value with web2py HTML functions def ajaxmessage(): return 'jQuery('#divAjaxTest').html(%s);' % repr(H1('ajax message')) #not returning any value. But if it is just a text with re...
1

votes
1

answer
1.2k

Views

How to access temporary uploaded file in web2py?

I am using a sqlform to upload a video file and want to encoding the video file while uploading. But I noticed that the upload file is not saved to uploads directory utill it is completely uploaded. Is there a temporary file and how can I access it ?Thanks.
Treper
1

votes
1

answer
2k

Views

web2py ajax issue onclick

I am trying to write a controller method and a corresponding view which will call the controller on web2py using Ajax. The idea is to make a small update on the database and return a simple updated message on a target div using Ajax. Below is contoller method: def deleteajax(): recid1 = request.vars...
rajaram_s
1

votes
1

answer
478

Views

web2py error : Connection reset by peer

I've been googling for days trying to find a straight answer for why this is happening, but can't find anything useful. I have a web2py application that simply reads a database and makes some requests to a REST api. It is a healthcheck monitor so it refreshes itself every minute. There are about 20...
user1475573

View additional questions