Questions tagged [web2py-modules]

web2py-modules are modules that are available in web2py web framework out of the box

web2py-modules are modules that are available in web2py web framework out of the box.

89 questions
0
votes
2 answers

Auth - register form redirects to profile - Web2py

My problem is silly but I still can't find the answer. I'm using auth functions of web2py but I'm customizing of what I need for example I created my own controller with my own functions using auth Once I logged in , I want to create a new user but…
0
votes
1 answer

How to download videos after they have been uploaded with web2py

I am using web2py for my college project. I have managed to upload a video into my database (by uploading it into 'uploads files'). But the problem is I don't know how to access that uploaded video afterwards. Can someone explain me how can I…
0
votes
1 answer

Web2py's port no of server from inside the application

How do I get the port no on the server (on which web2py app is deployed) from inside the web2py application (for ex. controller or module)? I am using urllib to interact with another action inside the controller by doing this response =…
0
votes
1 answer

Image Thumbnail in Web2py: Unable to display the thumbnail

I have used the suggestion here http://www.web2pyslices.com/slice/show/1387/upload-image-and-make-a-thumbnail to make a thumbnail of an image. I have got the thumbnail but I am unable to display it. The following are my functions: db.py…
Pulkit
  • 13
  • 5
0
votes
1 answer

How to filter words in db.body

I am working on a program that I want to filter out some words, with nltk style of removing the stopwords as follows: def phrasefilter(phrase): phrase = phrase.replace('hi', 'hello') phrase = phrase.replace('hey', 'hello') phrase =…
lobjc
  • 2,751
  • 5
  • 24
  • 30
0
votes
1 answer

Web2py : SQLFORM.grid : Making 2 columns unique

Here is my database definition: db.define_table('emsAlertTokens', Field('emsrelease','string',default=session.releasefield,writable=False,label=T('Release')), …
May
  • 1,158
  • 2
  • 13
  • 24
0
votes
1 answer

Using Tablib Library with Web2py

I've been trying for a while to make tablib work with web2py without luck. The code is delivering a .xls file as expected, but it's corrupted and empty. import tablib data = [] headers = ('first_name', 'last_name') data = tablib.Dataset(*data,…
Agustin.Ferreira
  • 311
  • 1
  • 3
  • 11
0
votes
1 answer

unable to create a new database in web2py...Syntax Error

I created a new SQL web2py database that is mentioned below...But when I try to save it, it gives syntax error. How do i save it on web2py and use it for my webpages.. dbOBJECT = SQLDB("sqlite://dbOBJECT.db") """ Table…
codefreak
  • 309
  • 2
  • 4
  • 15
0
votes
1 answer

invalid literal for long() with base 10: 'My-Library-Name'

I'm writing a query code in controller: books=db(db.book.lib_name=="My-Library-Name").select(db.book.title, db.book.ISBN, orderby=db.book.title) but I keep getting this error: invalid literal for long() with base 10:…
Dags
  • 41
  • 1
  • 1
  • 8
0
votes
1 answer

Error ticket opening web2pyslices : "admin disabled because unable to access password file"

I was looking for options to cascaded dropdown forms for a web2py application when I came across this solution! But trying to open the links in the accepted answer, I get thrown a web2py ticket stating "admin disabled because unable to access…
NightFury13
  • 761
  • 7
  • 19
0
votes
1 answer

Error calling variables from method class

Am working on a simple game/app. When I call a variable on web2py view, I get this error: quack= duck.quack() TypeError: unbound method quack() must be called with duck instance as first argument (got nothing instead) my codes are here: In the…
user3346746
  • 327
  • 3
  • 14
0
votes
1 answer

MySQL with web2py : foreign key constraint failing

I am trying to connect mysql with my web2py app: the home screen is coming, but on registering i get the following error: (1452, u'Cannot add or update a child row: a foreign key constraint fails…
Deep Jain
  • 47
  • 2
  • 9
0
votes
1 answer

How do i import python functions to web2py

My python example code: def test_print(): code..... print('Message posted') test_print() How do I import: test_print() to a HTML view in web2py?Do I have to alter the python code? my aim is to print the message on HTML
user3346746
  • 327
  • 3
  • 14
0
votes
1 answer

How to use helpers for list objects

I have this code: my_table = db.define_table('my_table', Field('mt_table_id', 'id', requires=[IS_NOT_EMPTY()]), I need to add something like requires= IS_LIST() to get a list e.g. ['a','b','c'] instead of ['a,b,c']. How is that done?
user3346746
  • 327
  • 3
  • 14
0
votes
1 answer

Web2Py - Setting up appliances/applications

I'm using web2py to create my webpage. I checked some applications for web2py in https://github.com/mdipierro/web2py-appliances I tried to set up an app but I have no idea how I can do it. The apps didn't have web2py.py file to run as a "Project"…
BugFixer
  • 293
  • 1
  • 4
  • 15