vscode is not understanding where web2py syntax is defined. I get following
error
Exception has occurred: NameError
name 'request' is not defined
File "
C:\alex\alt_w2p_06_source\web2py\applications\lower_case_8\models\db.py",
line 8, in if request.global_settings.web2py_version <
I mean where in the Web2py source code or settings can I tell web2py which
instance of python to use. Where can I type the path?
On Saturday, November 26, 2022 at 2:24:32 PM UTC-8 Arglanir wrote:
> sys.executable should be your friend.
>
> Le samedi 26 novembre 2022 à 08:42:52 UTC+1,
where is the path specified that points to python.exe?
Am using Windows source code for For Python 3.7
--
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)
---
unfortunately, I don't have the code.
I once made such a form from a book
web2py Application Development Cookbook
(I remember that there were errors in the book,
but the code that came with the book worked
after obvious changes)
On Tuesday, August 30, 2022 at 11:04:41 AM UTC+3 Kenneth wrote:
I put start-time capture at top of view, and end time-capture at bottom of
view. Start and end time are always result in identical values but seems
that end time should be different.
In view I have:
{{startTime = request.now}} [this is a top of view]
{{for a in
...takes a few seconds to
Hi!
You can create a table in memory and use grid
working example:
def pro_report1():
# https://web2py.wordpress.com/category/web2py-and-databases/
#
https://stackoverflow.com/questions/33674532/web2py-sqlform-grid-with-executesql
tbl = 'proverka'
#f_short_proverka = [ 'f' +
alexg...@gmail.com wrote:
>
>> using Postgres
>>
>> On Thursday, November 26, 2020 at 11:18:00 PM UTC-8 Alex Glaros wrote:
>>
>>> How to add db.role_member.id within select clause as highlighted below?
>>>
>>> If I leave it out, it runs fine
using Postgres
On Thursday, November 26, 2020 at 11:18:00 PM UTC-8 Alex Glaros wrote:
> How to add db.role_member.id within select clause as highlighted below?
>
> If I leave it out, it runs fine. If I add it, I get error:
> class 'psycopg2.errors.GroupingError'> column "
How to add db.role_member.id within select clause as highlighted below?
If I leave it out, it runs fine. If I add it, I get error:
class 'psycopg2.errors.GroupingError'> column "role_member.id" must appear
in the GROUP BY
and if I make it appear in the group by section as suggested by the
) AS person_list'
>>>>>>>>>> groupby = db.PERSON-PROJECT-PRIORITY.project_fk,
>>>>>>>>>> )
>>>>>>>>>>
>>>>>>>>>> суббота, 14 ноября 2020 г. в 09:40:17 UTC+3, alexg...@gmail.c
Variable
>
> thanks,
>
> Alex Glaros
>
--
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 t
for example
where mytable.id = someWeb2PyVariable
thanks,
Alex Glaros
--
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
dasjboards for web2py https://github.com/ali96343/facew2p
dashboards for py4web https://github.com/ali96343/facep4w
charts Highcharts.js
On Tuesday, November 17, 2020 at 11:47:04 AM UTC+3 Jonsubs wrote:
> Hi everyone,
> I need to implement a dashboard and some charts in my webapp. And honestly
>> person_fk
>>>>>>> project_fk
>>>>>>>
>>>>>>> prioritySet = db((db.PERSON.id ==
>>>>>>> PERSON-PROJECT-PRIORITY.person_fk) & (PROJECT.id ==
>>>>>>> PERSON-PROJECT-PRIORITY.project_fk)).select()
>>
rson_fk
>>>>> project_fk
>>>>>
>>>>> prioritySet = db((db.PERSON.id == PERSON-PROJECT-PRIORITY.person_fk)
>>>>> & (PROJECT.id == PERSON-PROJECT-PRIORITY.project_fk)).select()
>>>>>
>>>>
ou have additional time, how to write so output looks like:
>>
>> Paint-the-house (10) Tom, Sue, Tony, Ted, Mary, Fred, Sal, Chris, Ed,
>> Sally
>> Plant-a-garden (5) Harry, George, Joanne, Tony, Janet
>> Clean-out-garage (2) Clyde, Jane
>>
>> Thanks,
>>
ooks like:
Paint-the-house (10) Tom, Sue, Tony, Ted, Mary, Fred, Sal, Chris, Ed, Sally
Plant-a-garden (5) Harry, George, Joanne, Tony, Janet
Clean-out-garage (2) Clyde, Jane
Thanks,
Alex Glaros
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/we
maybe you could do this
def art_manage():
if len(request.args) >= 2 and ('new' == request.args[0]):
# some code
return ' create '
records= SQLFORM.grid(query=db.t_art,maxtextlength =
40,deletable=False,create=True, fields=[db.t_art.f_name, db.t_art.f_team,
1 create new app and mkdir docfiles in it
# models/db1.py
db.define_table( 'zurina',
Field('jenka_fnm', requires=IS_NOT_EMPTY(),
label='orig_file_name' ),
Field("fld",label="Remark", length=3500,),
it's work with web2py
inline for pdf, jpeg, png ...
save file fot other file types
def doc2user():
# read from db.table orig file name and path to file in upfolder
import os
prn_id = request.args(0,cast=int)
task = db.zurina(prn_id) or error()
qu=db.zurina.id == prn_id
only pdf to browser - inline
def doc2user():
import os
prn_id = request.args(0,cast=int)
task = db.zurina(prn_id) or error()
qu=db.zurina.id == prn_id
res= db(qu).select().first()
upfolder= os.path.join(request.folder, 'docfiles')
file_path = os.path.join( upfolder,
Hi!
solution
https://stackoverflow.com/questions/20508788/do-i-need-content-type-application-octet-stream-for-file-download
web2py func
def doc2user():
import os
prn_id = request.args(0,cast=int)
task = db.zurina(prn_id) or error()
qu=db.zurina.id == prn_id
res=
smartgrid sort with three one to many tables
def uvidomlen_all():
table=db.operacia
gqu = lambda tnm : (tnm.id>0) if auth.user.is_admin else
(tnm.created_by == me)
oqu = lambda tnm : ~db[tnm].id
constraints = {'operacia':gqu(db.operacia), 'os1doc':gqu(db.os1doc),
Hi!
some working solution
1 build a sqlite-table in memory, as required
2 insert data in the table
3 show table in smartgird
def pro_report1():
tbl = 'proverka'
l = [e for e in db[tbl].fields if e in f_short_proverka ]
memf = [ Field('oid', 'integer', label='П id', default= 0) ] +
cd web2py/gluon
grep -r X-Powered-By
./globals.py:self.headers['X-Powered-By'] = 'xping'
воскресенье, 12 апреля 2020 г., 16:02:13 UTC+3 пользователь Yan Wong
написал:
>
> I'm a bit disappointed that web2py by default sets `X-Powered-By: web2py`
> in the http header, thus making it
Thanks Larry! great example.
maybe in *webpack.config.js*
*- app: './static/reactsrc/index.tsx'*
+ app: './static/src/index.tsx'
среда, 11 марта 2020 г., 18:59:40 UTC+3 пользователь Larry Weinberg написал:
>
> Several people have asked about how to set up web2py to work with React
> (and
items_sub_menu= []
menu_item = [ (chr( 0x0001f534 ), False, URL('default', 'index'),
items_sub_menu) ]
save_orig_menu= response.menu
response.menu = menu_item
response.menu += save_orig_menu
items_sub_menu.append( (T('home'), False, URL(_app, 'default', 'index') ),)
items_sub_menu.append(
import cPickle, os
def put_on_disk(file_name, data):
uploadfolder=os.path.join(request.folder, 'uploads')
fn = os.path.join(uploadfolder, file_name)
out_file = open(fn, 'w')
cPickle.dump(data, out_file)
out_file.close()
def get_from_disk(file_name):
is that possible?
similar to the web2py
{{=form.custom.begin}}Name:
{{=form.custom.widget.name}}{{=form.custom.submit}}{{=form.custom.end}}
form.element('input[name=name]')['_id']='myid'
form.element('input[name=name]')['_class']='myclass'
Thanks
Alex
--
Resources:
- http
[X] loaded _dashboard
[FAILED] loading myfeed
..
FileNotFoundError: [Errno 2] No such file or directory:
'apps/myfeed/databases/sql.log'
-
mkdir apps/myfeed/databases
and restart
понедельник, 10 февраля 2020 г., 9:13:46 UTC+3 пользователь Massimo Di
Pierro
Hi!
Here is the script and working examples for sqlform and customform
https://github.com/ali96343/facew2p
http://alibsk.pythonanywhere.com
среда, 4 декабря 2019 г., 18:47:26 UTC+3 пользователь L c написал:
>
> Hi,
> Soory but i do not find answer:
>
> I did that :
>
>1. Create a subfolder
.
On Monday, October 14, 2019 at 3:28:31 PM UTC+2, Alex wrote:
>
> We have upgraded to the latest web2py version 2.18.5 (from a very old
> 2.12.3) and also changed from Python 2 to 3.
>
> Most things are working fine but we have one major issue: from time to
> time a
1:
views/default/myindex.html
Mysite
myown unique page with my_css
{{=message}}
2:
def index():
response.view = 'default/myindex.html'
return dict(message=T('Welcome to web2py!'))
пятница, 11 октября 2019 г., 8:38:52 UTC+3 пользователь Jay B написал:
>
> Hello guys,
>
> I'm
суббота, 11 мая 2019 г., 5:12:26 UTC+3 пользователь Val K написал:
>
> As result of experimenting with Rapydscript I want to present my
> alternative web IDE for web2py,
> (that could be easily ported to web3py as well)
> https://github.com/valq7711/vue2pyj
>
> Any feedback is appreciated
>
>
e()
File "/home/w3p/anaconda3/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
ERROR:Rocket.Errors.Thread-5:Tried to send "500 Server Error" to client but
received socket error
Ale
clone kept the requires statements: requires = IS_IN_DB(db,
'my_big_tables.id' ... and still ran fast so can the "reference
my_big_tables" statement be safely, and completely eliminated from db.py?
The "reference" statement really slows things down.
thanks,
Alex Glaros
-
it's port lte-2.4.15 to py4web
https://github.com/ali96343/lteadmin-py4web
четверг, 1 августа 2019 г., 10:48:02 UTC+3 пользователь Alex Beskopilny
написал:
>
> Hi!
> I put lte-2.4.15 to py4web and lte works with controllers.py :
>
> from py4web import action, request, abort
69.54
четверг, 1 августа 2019 г., 10:48:02 UTC+3 пользователь Alex Beskopilny
написал:
>
> Hi!
> I put lte-2.4.15 to py4web and lte works with controllers.py :
>
> from py4web import action, request, abort, redirect, URL
> from yatl.helpers import A
> from . common impor
Hi!
I put lte-2.4.15 to py4web and lte works with controllers.py :
from py4web import action, request, abort, redirect, URL
from yatl.helpers import A
from . common import db, session, T, cache, auth
@action('index')
@action.uses('index.html', )
#@action.uses(Template('index.html',
start second guicorn
You have to run your projects on different ports like firsrone on 8000 and
secondone on 8001. Then in nginx conf, in place of location /, you have to
write location /firstone/ and proxy pass this to port 8000 and then write
same location object for second one as
понедельник, 1 июля 2019 г., 16:23:30 UTC+3 пользователь Áureo Dias Neto
написал:
>
>
> .
>
for me works
1 up second gunicorn
2 dom2.conf
upstream gunidom2 { server unix:/home/w2p/var/guni-dom2.sock
fail_timeout=0; }
server {
listen xx.yy.zz.ww:443 ssl http2;
Hi! imran tube
_only_ web2py !
download css-html-template and run app builder
some demo
https://alibsk.pythonanywhere.com/
четверг, 27 июня 2019 г., 6:08:54 UTC+3 пользователь imran tube написал:
>
> which framework best for me django or web2py?
> web2py all demo site not work or old or
if any ( ['.jpg' in file_name, '.JPG' in file_name , ] ):
?
суббота, 22 июня 2019 г., 11:18:42 UTC+3 пользователь Константин Комков
написал:
>
> I made upload form for files that winter and today when project is working
> 3 days user told me that he can't load file. When I saw that file
ough a SSL service and my routes.py
looks like:
#!/usr/bin/python
# -*- codingf-8 -*-
routers = dict(
# base router
BASE=dict(
default_application='myDomain',
domains={'www.myDomain':'myDomain'}
),
)
thanks,
Alex Glaros
--
Resources:
- http://web2py.com
- http://web2p
This is not a template generator.
This is a template installer to web2py env.
Examples for some free admin dashboards in applications dir
четверг, 9 мая 2019 г., 21:25:00 UTC+3 пользователь Alex Beskopilny написал:
Hi !
>
>https://github.com/ali96343/facew2p.git
>
Hi !
https://github.com/ali96343/facew2p.git
Here is a script that generates web2py application from css templates.
The script generates layouts, form (from html tag ), tables (from
html tag ).
The script has been tested on 50 templates.
Thanks and best regards,
Alex Beskopilny
This also happens with the latest web2py version 2.18.5
I've opened an issue here:
https://github.com/web2py/web2py/issues/2182
On Wednesday, April 17, 2019 at 2:54:00 PM UTC+2, Leonel Câmara wrote:
>
> Please open an issue, you're right, this is a bug and a security problem,
> it's also very
Thanks for your suggestions. Although nothing gets me the desired result.
If I use urllib.quote or XML in the controller way too much gets escaped
(all < and > signs, blanks, etc.) which is not what I want. And I'd have to
do this for all attributes in every controller function.
My problem is
thanks for your answer. Problem is when I use sanitize then the output is
var filterSettings = {section
/scriptiframe;
which is not valid js because the attribute quotes should not be escaped
btw, I'm using web2py 2.12.3 - maybe that's fixed/improved in future
versions? or am I doing something
ms\Python\Python37\Scripts
>
> (and if you have other python versions installed, use pip3 or even pip3.7 )
>
> Cheers,
> Nico
>
> Il giorno lun 8 apr 2019 alle ore 07:15 Alex Glaros > ha scritto:
>
>> How to pip install psycopg2? I get the following error:
>>
I installed source version of web2py windows and that worked. I guess
windows binary doesn't have a path to python.exe
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
thanks,
Alex Glaros
--
Resources:
- http://web2py.com
- http://web2py.com/book (D
my understanding is that it is looking for a file name python.exe but the
binary version of windows web2py does not have that file. Do I just point
to the gluon directory?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
I see this attached. What value am I supposed to specify?
--
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
same question with Wing IDE, what do I enter for python path?
--
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
I have community version of pycharm and windows 10 binary version of web2py.
Pycharm: "No python interpreter selected"
How to resolve this?
thanks
Alex Glaros
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source cod
Works like a charm, thanks so much!
--
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
It kind of works but adds a an opening and closing bracket "[" that surrounds
the whole data like this:
var datascource = [{"id": 2, "name": "Fred", all the rest of the data for the
whole process}];
If I paste the json directly into the JavaScript function and manually delete
the
"as_trees" works great, but but how to remove the "Row<" verbiage from the
result? You mentioned "serialize the result into json". Can you please show
example? At the current stage, the data looks like this:
[, , etc
thanks,
Alex Glaros
--
Reso
ject_fk
==
db.object_super_object.id)).select().as_trees(parent_name=db.role_member.object_super_object_fk)
File
"C:\alex\alt_web2py_11_new_boot\web2py_win\web2py\gluon\packages\dal\pydal\objects.py",
line 2470, in as_trees
drows[row.id] = row
File
"C:\alex\alt_web2py_11_new_boot\w
Miao', 'title': 'department manager' },
{ 'name': 'Chun Miao', 'title': 'department manager' }
]
};
Could Pandas be used to convert the data?
thanks,
Alex Glaros
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source
am on Windows
--
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"
in default.py:
from reportlab.platypus import *
produces the following error:
(ImportError('No module named
reportlab.platypus',), )Version
web2py™ Version 2.18.1-stable+timestamp.2019.02.24.06.24.15Traceback
1.
2.
3.
4.
5.
6.
7.
8.
9.
Traceback (most recent call last):
File "C:
that mean it's
also available for regular database work if I find any further use for it
such as non-ACID transactions and searches?
thanks,
Alex Glaros
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com
story.append(Paragraph(escape(text), styles["Normal"]))
On Tuesday, January 15, 2019 at 8:15:50 AM UTC-8, Alex Glaros wrote:
>
> When converting to PDF, line breaks from a text field are collapsed. How
> to retain the line breaks? Here is the PDF-cr
also tried
db.client_controlled_documentation_stakeholder_content.client_controlled_documentation_stakeholder_content_narrative_description.represent
= lambda v, r: DIV(v, _style='white-space:nowrap')
Alex Glaros
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source cod
past
due
thanks
Alex Glaros
--
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
&qu
Alexandra, I have not used it recently and only have my notes below:
pg_dump
--host=yourPythonAnywhereDbName.postgres.pythonanywhere-services.com
--dbname=postgres_myDbName --(note: I don't know how to handle password)
--port=10097 --username=yourPythonAnywhereRole --format=c
okay, guess I'll this use BS4 to create web page columns -
https://getbootstrap.com/docs/4.0/layout/grid/
One of three columns
One of three columns
One of three columns
--
Resources:
- http://web2py.com
-
Also, where is this linked from?
It’s in the welcome site:
\web2py\applications\examples\views\default\support.htm
--
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
}}
{{include 'default/personal_connections_menu.html'}}
{{end}}
{{block right_sidebar}}
{{end}}
{{extend 'layout.html'}}
thanks,
Alex Glaros
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p
the issue is still
> present.
>
> El 01/09/18 a las 12:28, Carlos Cesar Caballero Díaz escribió:
>
> maybe is related with Python version, let me test
>
> El 01/09/18 a las 11:44, Alex escribió:
>
> Hi Carlos,
>
> thanks for your response. On a Mac with Python 3
Django and web2py
so it's easier for you to understand how everything fits together.
regards,
Alex
On Tuesday, November 28, 2017 at 2:33:17 PM UTC+1, Ramos wrote:
>
> Great
> I´m loving your tool...
> Regards
>
>
> 2017-11-28 13:29 GMT+00:00 Alex >:
>
>> yo
Hi Carlos,
thanks for your response. On a Mac with Python 3.7 this does not seem to
happen. Does anyone know if it is related to the OS or Python version?
Alex
On Saturday, September 1, 2018 at 5:32:24 PM UTC+2, Carlos Cesar Caballero
wrote:
>
> Hi Alex, seems a bug with Python 3,
the latest web2py 2.17.1, anyone got an idea what's
wrong?
Traceback (most recent call last):
File "/home/alex/web2py/web2py_2.17.1/gluon/restricted.py", line 219, in
restricted
exec(ccode, environment)
ZeroDivisionError: division by zero
During handling of the above exceptio
I've read that two-factor authorization using SMS is insecure
<https://www.wired.com/story/two-factor-authentication-apps-authy-google-authenticator/>
.
Is there available, or has anyone installed google authentictor or authy on
their sites?
thanks
Alex Glaros
--
Resources:
s =
SQLFORM.factory(db.role_member_status_instance,
labels={'role_member_status_fk':P('Role Member Status', B('*',_style=
'color:Red;font-size:140%'))})
thanks
Alex Glaros
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google
You are right , sym-link is simple example.
In multi-python multi-web2py envs I use to full path to python
(centos 7 /etc/systemd/syste/gunicorn.service)
---
[Unit]
Description=Gunicorn instance to serve web2py
After=network.target
[Service]
User=w2p
Group=w2p
you missed
adduser pyuser
sudo su pyuser
:(
вторник, 8 мая 2018 г., 3:11:37 UTC+3 пользователь 黄祥 написал:
>
> plan to test web2py both python2 and python3 in 1 machine, any idea how to
> do that in the safety way?
> already googling found this:
>
> brew update
> brew install python
> brew
use anaconda .
1 adduser pyuser
2 su pyuser
3 install anaconda https://conda.io/miniconda.htmlto ~/opt
4 conda create --name mypython3 python=3
ln -s ~/.conda/envs/mypython3/bin/python3 ~/bin/mypy3
5 conda create --name mypython2 python=2
ln -s
Hi!
exporter example
0 pip install xlwt
1 at end of gluon/sqlhtml.py
class ExporterXLS(ExportClass):
label = 'XLS'
file_ext = "xls"
content_type = ".xls"
# https://gist.github.com/brendano/22764
# https://groups.google.com/forum/#!topic/web2py/MR_8JzzP9o4
def
try this
cd /home/w2p/web2py
python -c "import gluon.compileapp;
gluon.compileapp.compile_application('applications/myapp')"
# for using gzip compression with nginx
#
https://www.digitalocean.com/community/tutorials/how-to-add-the-gzip-module-to-nginx-on-ubuntu-14-04
#
also, it's very useful sslh https://github.com/yrutschle/sslh
works fine with nginx
суббота, 10 февраля 2018 г., 17:11:43 UTC+3 пользователь lucas написал:
>
> hey all,
>
> setting up a new server on centos 7.4 and apache 2.4. web2py is running
> fine for i get the welcome content but none of
we use nginx with http2
rebuild nginx with http2 support on centos 7
-
export NXT_CC_NAME=gcc # default compiller for nginx
OPENSSL="openssl-1.0.2h" # ok with nginx-1.11.13-1
nginx much better :)
simple setup -
https://www.digitalocean.com/community/tutorials/how-to-deploy-web2py-python-applications-with-uwsgi-and-nginx-on-centos-7
суббота, 10 февраля 2018 г., 17:11:43 UTC+3 пользователь lucas написал:
>
> hey all,
>
> setting up a new server on centos 7.4 and
truncate with foreign-key depends on DB.
for postgresql :
def clear_tbls():
str1 = ','.join( [ t for t in db.tables() if "auth_" not in t] )
if len(str1):
db.executesql( 'truncate {} RESTART IDENTITY'.format(str1) )
понедельник, 14 ноября 2011 г., 3:38:15 UTC+3
use encode () decode() for utf8 message
example:
1
def cyr2upper(inp,up=True):
if len(inp) > STR_LEN_LIMIT:
inp= inp[:STR_LEN_LIMIT]
try:
inp=inp.decode('utf8')
except UnicodeDecodeError, e:
inp=u'Уточните данные , плс, :)'
symbols =
we can set page encoding in
models/db.py
T.force('ru')
if request.env.wsgi_url_scheme in ['https', 'HTTPS']:
session.secure()
...
пятница, 5 января 2018 г., 22:41:19 UTC+3 пользователь Alexey Zaytsev
написал:
>
>
>
small fix - use dockerDNS
1
# run.sh
docker rm $(docker stop $(docker ps -a -q --filter ancestor=w2pnginx
--format="{{.ID}}"))
docker rm $(docker stop $(docker ps -a -q --filter ancestor=w2pguni
--format="{{.ID}}"))
docker network rm w2pnet
docker network create --subnet=172.25.0.0/16 w2pnet
four files in same directory
1
#guniDoc
FROM python:2.7
RUN apt update && apt install -y unzip wget
ENV PATH=/usr/local/bin:$PATH
RUN pip install gunicorn
RUN useradd -m -r web2py
USER web2py
WORKDIR /home/web2py
RUN wget -c http://web2py.com/examples/static/web2py_src.zip && \
unzip -o
small fix
1
FROM python:2.7
RUN apt update && apt install -y unzip wget
RUN /usr/local/bin/pip install gunicorn
RUN groupadd -r web2py && useradd -m -r -g web2py web2py
USER web2py
WORKDIR /home/web2py
RUN wget -c http://web2py.com/examples/static/web2py_src.zip && unzip -o
web2py_src.zip &&
1 Dockerfile
FROM python:2.7
RUN apt update && apt install -y unzip wget
RUN /usr/local/bin/pip install gunicorn
RUN groupadd -r web2py && useradd -m -r -g web2py web2py
USER web2py
RUN cd /home/web2py/ && wget -c
http://web2py.com/examples/static/web2py_src.zip && unzip -o
web2py_src.zip
Hi
set WORKDIR in Dockerfile
..
WORKDIR /home/site/web2py
EXPOSE 80
CMD . /home/..
..
docker run 3001:80 image-name
On Friday, January 5, 2018 at 5:45:04 AM UTC+3, 黄祥 wrote:
>
> just wondering why gunicorn dockerfile with web2py/anyserver.py is not
> work when use with python:2.7
Hi!
replace print "install"
with print ("install")
On Tuesday, January 2, 2018 at 10:06:31 PM UTC+3, 黄祥 wrote:
>
> cant execute from terminal web2py modules while in previous version is
> work fine
> *step on local machine (terminal)*
> python -V
> Python 2.7.10
> cd
> rm -rf
#model/db.py
if not db().select(db.auth_user.ALL).first():
uid=db.auth_user.insert(
password = db.auth_user.password.validate('mypassword')[0],
email = 'n...@null.com',
first_name = 'Sy',
last_name = 'Adm',
)
On Friday, December 8, 2017 at 1:06:35 PM UTC+3, T.R.Rajkumar wrote:
>
> I have an application. The views extend layout.html. When there is no
> internet connection my pages wait for fonts.googleapis.com
> I dont want that to happen. How to remove the dependecy on
> fonts.gooleapis.com
>
is there any css missing on startup page for windows: Version
2.16.1-stable+timestamp.2017.11.14.05.54.25
(Running on Rocket 1.2.6, Python 2.7.9)
see top links and whited out button on attached
thanks
Alex Glaros
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation
On Friday, December 8, 2017 at 1:06:35 PM UTC+3, T.R.Rajkumar wrote:
>
> I have an application. The views extend layout.html. When there is no
> internet connection my pages wait for fonts.googleapis.com
> I dont want that to happen. How to remove the dependecy on
> fonts.gooleapis.com
>
hI!
>From another thread here: Bootstrap 4 dropped the bootstrap 3 included
glyphicons. You need to use fontawesome or something like that and give a
ui dict to grid with the proper classes to use.
Alex Glaros
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- h
your attached report is only 1,8 kB
reports can get large in case you include large images. currently the image
data itself is not resized, so if you have a very large image the report
could get very large as well. Further if you use additional fonts the fonts
are embedded in the pdf.
about
1 - 100 of 1417 matches
Mail list logo