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
1
vote
0 answers

Force reload of a module every time in web2py

Many thanks for reading: I have to following code in a .py file calling a web2py function within the default controller: Snippet of code in .py running from IDLE - username and password are imported correctly payload = {'username': username,…
1
vote
1 answer

How to make user defined classes in web2py

I am trying to make a class within a module, import that module file in my controller, and then reference the class that is defined within that module, but I keep getting a message that reads NameError("name 'self' is not defined") Here is my code…
B Welch
  • 15
  • 1
  • 7
1
vote
1 answer

How to connect to web2py server remotely

I have set up a web2py application on my ubuntu 12.04 system. On the machine, the application gets opened in browser via localhost:8000. But when I try to connect through other computer, its not connecting. I tried to connect via IP address of the…
1
vote
1 answer

web2py-ckeditor how to display the rich text created by ckeditor instead of the html tags

I am using web2py with ckeditor.I want to input rich text into the database with SQLFORM. So I choose ckeditor as a field widget. I have installed the ckeditor and here is my db.py: from plugin_ckeditor import CKEditor ckeditor =…
1
vote
1 answer

How to printout data from a list in web2py

In a code such as shown below, I have data that is dumped to a list as shown: def foo(): list1=[It’s possible Arianne could appear in future seasons, but as Kotaku notes, the official character bio of Trystane describes him as the heir to…
lobjc
  • 2,751
  • 5
  • 24
  • 30
1
vote
4 answers

How to randomly call any method from a list

Am still new to web2py and python, in my web2py app, i created this code that works well in python shell. python modules: The methods work in such a way that a user inputs an equation query to get an answer. If it is an addition, method1 works it…
user3346746
  • 327
  • 3
  • 14
1
vote
1 answer

How to use T to tranlate strings in web2py module?

I have a countries.py module living in my web2py applications module folder. It defines the following tuple: COUNTRIES = ( ('AF', T('Afghanistan')), ('AX', T('Aland Islands')), ('AL', T('Albania')), ('DZ', T('Algeria')), …
User
  • 62,498
  • 72
  • 186
  • 247
1
vote
1 answer

Mimicking the behavior of HTML5 pattern attributes for inputs using web2py?

I'm looking to validate all of my forms with HTML5 and the pattern attribute, but as always, nothing is perfect on the internet and I still need a backup to catch those users who do not use HTML5 friendly browsers. I'm having trouble finding exact…
o_O
  • 5,527
  • 12
  • 52
  • 90
1
vote
2 answers

can we use java code in web2py application code?

I have to implement one web2py application which has to access java code (which has code to connect to the remote machine) but not sure whether we can do it in web2py or not.My PC has Java 1.6, Python2.7 ,web2py ,eclipse installed. Use case is : I…
piks
  • 1,621
  • 8
  • 32
  • 59
0
votes
1 answer

web2py: custom forms can not edit anymore after submitting

I am working on a custom project in web2py and I am facing one problems I can not edit submitted data anymore for some reason. Controller @auth.requires(auth.has_membership(group_id = 'admin') or auth.has_membership(group_id =…
0
votes
0 answers

Web2py & Google App Engine import errors

I tried to start web2py 1.98.1 using dev_appserver.py, but it cannot find the "pickle" module. Traceback (most recent call last): File "/home/matthew/dev/sdks/google_appengine_1.5.2/google/appengine/ tools/dev_appserver.py", line 4144, in…
Matt Norris
  • 8,596
  • 14
  • 59
  • 90
0
votes
2 answers

How to set IS_NOT_EMPTY and string (not included 0-9) in web2py data structure

I am developing web2py - Models - db_testing.py in pythonanywhere.com below code is running successfully: # -*- coding: utf-8 -*- db = DAL('sqlite://storage.sqlite') db.define_table('registration', Field('firstname',…
0
votes
1 answer

py4web DAL, web2py - (Legacy) database exploration - how to get all tables, fields, etc?

Unfortunately there is no py4web tag (that and one for modules should be added) so i put it under web2py as DAL is the same. If someone can create a tag (maybe talking to Massimo ..) its appreciated. Its possible to access nearly whatever database…
klausz
  • 33
  • 6
0
votes
1 answer

Upload wav file and save in directory using python

Here is my db Model db.define_table('manage_music_file', Field('action_is', requires=IS_IN_SET(('Insert', …
0
votes
1 answer

Web2py Scheduler Waiting for a task to complete before starting a new task launched from different UI

I have a small web application and it process background task. The task takes 5 minutes to complete. So i have used scheduler. I have configured scheduler as service in a ubuntu machine. [Unit] Description=Web2Py scheduler…
May
  • 1,158
  • 2
  • 13
  • 24