My delete function is not working, I think I am doing doing something wrong
but i'm not sure where, I thought the code below would get me home but
nothing is happening, nothing is getting deleted! Please advice:
*DELETE FUNCTION CONTROLLER CODE:*
def deleteInvoice():
Thanks Antony.
I already have the line
auth.define_tables(username=False, signature=False)
and the book mentions: migrate=False as a parameter to auth.define_tables
However it was not obvious for me that it can be used this way
This topic certainly increased my understanding of web2py
Thanks
On
*models/db.py*
from gluon.dal import InDBMigrator
db = DAL(configuration.get(configuration_env + '_' + 'db.uri'),
pool_size = configuration.get(configuration_env + '_' + 'db.pool_size'),
migrate_enabled = configuration.get(configuration_env + '_' +
'db.migrate_enabled'),
migrate =
*models/db.py*
from gluon.dal import InDBMigrator
db = DAL(configuration.get(configuration_env + '_' + 'db.uri'),
pool_size = configuration.get(configuration_env + '_' + 'db.pool_size'),
migrate_enabled = configuration.get(configuration_env + '_' +
'db.migrate_enabled'),
migrate =
cant access error admin
url :
http://localhost:8000/admin/default/ticket/admin/127.0.0.1.2019-01-07.11-40-26.d14ede65-9b57-4176-9868-1b1213357273
2.17.2-stable+timestamp.2018.10.06.18.54.02
(Running on Rocket 1.2.6, Python 3.7.2)
Traceback (most recent call last):
File
Thank you, Massimo,
Now it's working
Thanks & Regards
Sandeep
On Sat, Jan 5, 2019 at 11:42 PM Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
>
> If you are getting the error:
>
> ImportError: cannot import name 'Cookie'
>
> Either your are not installing the latest pydal or you have two
I know it's not too much originality, but perhaps web2py-template?
Or perhaps something like insole or markings.
Greetings.
El 6/1/19 a las 11:56 a.m., Massimo Di Pierro escribió:
Fantastic! Thank you.
Will include and deploy today or tomorrow.
How should we call this package?
Massimo
On
On Sunday, January 6, 2019 at 2:41:53 PM UTC-5, icodk wrote:
>
> Thanks to all of you
> How do I add migrate to the auth tables ?
> I use
> auth.settings.extra_fields for extra fields but entering
> migrate='db1_auth_user.table' does not fits in this structure
>
You can do:
Hi Massimo, thanks for your answer.
sites-packages is an option indeed.
Importing modules works without issues when i fully qualify the import path
like:
from applications.myapp.modules.utils import anyfunc
I have been reading the custom_import, which tries to find or reload the
module
Got it,
Thank you
On Sun, Jan 6, 2019, 4:48 PM 黄祥 it depends on what you want to have version record of your files (better
> to put it all web2py apps on github)
> $ tree web2py/applications/web2pyapp
> web2py/applications/web2pyapp
> |-- ABOUT [if any]
> |-- LICENSE [if any]
> |-- __init__.py
>
it depends on what you want to have version record of your files (better to
put it all web2py apps on github)
$ tree web2py/applications/web2pyapp
web2py/applications/web2pyapp
|-- ABOUT [if any]
|-- LICENSE [if any]
|-- __init__.py
|-- controllers
|-- cron [if any]
|-- languages
|-- models
|--
Oh, I didn't express myself precisely: I am asking about Github - I am
setting up a Github repository and wondering what exactly from the app
directory should go in there - without extra files and without missing
files - to preserve complete app/set
On Sun, Jan 6, 2019 at 2:51 PM 黄祥 wrote:
>
for pack or unpack thing it's use tar
ref:
https://groups.google.com/d/msg/web2py/khiGuJYxHpo/clEEU7n3VGEJ
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
I used to pack and unpack the app between my local computer and
pythonanywhere - was going back and forth daily. worked like a charm.
now got t github.
Should I place the whole application/ folder in its entirety or I
should skip some files?
I am not sure how pack / unpack does it, i.e. if it
Thanks to all of you
How do I add migrate to the auth tables ?
I use
auth.settings.extra_fields for extra fields but entering
migrate='db1_auth_user.table' does not fits in this structure
I also tried:
db.auth_user._migrate='db1_auth_user'
just after the auth.settings.extra_fields but get
On Sunday, January 6, 2019 at 9:48:57 AM UTC-5, mostwanted wrote:
>
> The one you gave a link to i am familiar with, i just wanted to understand
> if the .exe custom pack introduced something new.
>
It adds your application to the /applications folder of the produced zip
file.
Anthony
--
Hello, today I was trying to change the theme of the web2py text editor and
now it's totally broken. I've tried to restart the machine or open another
app or return to the default theme but it's still broken. What I mean by
broken is that it's now only like a small text box with no colors at
Fantastic! Thank you.
Will include and deploy today or tomorrow.
How should we call this package?
Massimo
On Sunday, 6 January 2019 08:15:58 UTC-8, Carlos Cesar Caballero wrote:
>
> I have created a pydal-like structure for templates, including an initial
> setup.py and tests (there is also a
Do you mean static files with spaces in their names? uploaded content does
not allow this because names are auto-generated.
On Sunday, 6 January 2019 01:23:11 UTC-8, Dave S wrote:
>
> In making a backup copy of a site I'm involved in (we're changing
> webmasters, and the site may also be moved
I have created a pydal-like structure for templates, including an
initial setup.py and tests (there is also a fix for python 3 when
running standalone), you can take a look at
https://github.com/cccaballero/web2py/tree/modular_templates/gluon/packages/template
Greetings.
El 5/1/19 a las 1:18
The one you gave a link to i am familiar with, i just wanted to understand
if the .exe custom pack introduced something new.
On Sunday, January 6, 2019 at 4:17:04 PM UTC+2, Anthony wrote:
>
> It creates a standalone version of web2py (with its own Python
> interpreter) that contains your
On Sunday, January 6, 2019 at 9:15:41 AM UTC-5, mostwanted wrote:
>
> Hey Anthony, thanks for the heads up in the garbage code in the controller
> i will address it, with regards to deleting invoices i want to be able to
> delete all invoices in the db.invoice table but only for a specific
>
On Sunday, January 6, 2019 at 9:16:00 AM UTC-5, Shawn Michaels wrote:
>
> What you wrote makes sense to me, but in nginx log there is no localhost
> or it's IP address alternative but public IP address, which confuses me.
> With enabled hosts file line in log is my PC's local IP address.
>
What
The Python code is run on the server, so you cannot use it to check the
filesystem on the end user's computer. Further, for security reasons, the
browser will not allow you to directly read/access the user's filesystem.
What are you trying to do?
Anthony
On Saturday, January 5, 2019 at
It creates a standalone version of web2py (with its own Python interpreter)
that contains your application, which you can then use to distribute as a
standalone binary, as described here
What you wrote makes sense to me, but in nginx log there is no localhost
or it's IP address alternative but public IP address, which confuses me.
With enabled hosts file line in log is my PC's local IP address.
Dne 06. 01. 19 v 15:09 Anthony napsal(a):
> Disabling an app does not affect local
Hey Anthony, thanks for the heads up in the garbage code in the controller
i will address it, with regards to deleting invoices i want to be able to
delete all invoices in the db.invoice table but only for a specific
selected client. I want to be able to delete an entire invoice by clicking
Disabling an app does not affect local requests. Using the hosts file, you
access the app as if it is an external request (via the host name defined
in the hosts file), so disabling is enforced. When you instead switch to
accessing the app locally (i.e., via "localhost" or 127.0.0.1), the
>
> *INVOICE DELETING CONTROLLER*
> def deleteInvoice():
> #THE .first() FUNCTION IN THE LINE BELOW ONLY ALLOWS ME TO DELETE ITEMS
> ONE AT A TIME
> *query = db(db.invoice.id==request.args(0, cast=int)).select().first()
> *
> remove = db(db.invoice.id==query).delete()
>
Above, query is
>
> I also attempted to use the fake_migrate_all=True ,migrate=False but none
> of the auth files was created. Only my own tables files
> 1. deleted all the databases folder files and set DAL's
> fake_migrate_all=True ,migrate=False
> 2. Only my tables files (in databases folder), and
Hi Massimo, there is already a package called template in pypi, how
should we name the new template module?
Greetings.
El 5/1/19 a las 1:18 p.m., Massimo Di Pierro escribió:
Anybody wants to help
1) moving the scheduler and validator tests into pydal.
2) moving the template tests into
I have a view that create an invoice, at present i can only delete 1 item
at a time from the invoice but what i want is to be able to delete all
items from the invoice at the same time by clicking a link, below is my
code.
*INVOICE CODE:*
The address in router means domain in fact.
The problem is when I connect from PC on same network as server and have
/etc/hosts file with the mentioned line enabled I see Temporarily down
for maintenance, that is correct. But it should be in second event the
same, but isn't. I comment out the
In making a backup copy of a site I'm involved in (we're changing
webmasters, and the site may also be moved to another host), I've noticed
that requesting resources with spaces in the name returns INVALID REQUEST.
(The site is essentially a static site, and for testing the copy I've
On Saturday, January 5, 2019 at 7:15:02 AM UTC-8, Chris V. wrote:
>
> I never tryed fake migrate before but every time that I move an app to
> another server first I put the app in the server then I delete everything
> inside the database folder, then run the app via web browser (this create
35 matches
Mail list logo