Familiar discussion to me because I raised same topic before. :-)
Glad to see LEGEND is in, it is not too late for me to quit the habbit
of TAG.LEGEND. :-P
Seriously speaking, I still suggest to make TAG. more noticeable
(e.g. the first one in HTML helper section) in the builtin document as
Hi Massimo,
I was on this problem MadWalker this morning, perhaps I can offer some
insights into the problem.
This is essentially an electronic record-book project.
1. The "notebook" table contains the set of notebooks created.
db.define_table('notebook',
SQLField('name'))
2.
I usually just set a constant in a models/conf.py (along with DB and
other params which vary on the development and the deployment setup)
and check for that.
On Jan 28, 1:23 pm, rctay wrote:
> Hi,
>
> what do you guys think of providing a global variable (at application-
> level), say, WEB2PY_AP
Hmm, you don't sound like you're using any VCS/SCM.
anyway, by using that flag, you could minimize the possibility of
human error (ie. the possibility that you forgot to update that
variable on either setup while moving code between both).
you could also debug your deployment setup quickly by tu
I'm using svn and bzr. The conf.py file is usually on an ignore list
and I provide a conf.example.py file (commented example entries) for
reference. That way I have no live config data in the versioning
system, and update/commit does not change the config file, so all is
well (this is actually not
Oh i see.
Well what I'm proposing is that such a workflow (ie with a development
flag) is shared with web2py users, not just among ourselves. :)
On Jan 29, 10:58 pm, achipa wrote:
> I'm using svn and bzr. The conf.py file is usually on an ignore list
> and I provide a conf.example.py file (comm
This would be considered a web2py level configuration flag and that is
against to web2py phylosophy (no configuration).
You should be able to mimic it anyway.
you can set a environment variable (before starting web2py) and you
should be able to see it in request.env.your_environment_variable.
M
I think you want:
db.define_table('notebook',
SQLField('name'),SQLField
('archived','boolean',default=False))
db.define_table('entry',
SQLField('title'),
SQLField('notebook',db.notebook))
and then you need as JOIN as you say
records=db(db
Maybe web2py could endorse a 'standard' env variable, so people do not
have to set more than one:
WEB2PY_ENV_MODE = DEVELOPMENT | PRODUCTION | TEST | BENCHMARK
I think environment modes are important especially for performance.
If your app spends <1% of requests in development, and >99% in
produ
OK let's just use WEB2PY_MODE than and it will appear in
request.env.web2py_mode
Notice we aready have
request.env.web2py_path
request.env.web2py_version
Massimo
On Jan 29, 10:33 am, Robin B wrote:
> Maybe web2py could endorse a 'standard' env variable, so people do not
> have to set more t
Greetings everyone!
This is my first post on this forum. My appreciation (in advance)
for any help any of you can lend me.
SYNOPSIS: My app uses Web2py along with MS Sql Server. I placed a
unique constraint on a column in my SQL table, and if a user attempts
to enter a duplicate value in th
According to this: http://code.google.com/p/pyodbc/wiki/Errors
it should not do so.
Can you provide an example of an error that raises IntegrityError but
should not?
Massimo
On Jan 29, 10:23 am, NetHead wrote:
> Greetings everyone!
>
> This is my first post on this forum. My appreciation (i
I put following code to a function in controller an ran it:
db.export_to_csv_file(open('f7bkp','w'))
for table in db.tables: db[table].truncate()
db.import_from_csv_file(open('f7bkp','r'))
export OK, drop tables OK, but import gave me:
File
"/home/julo/+/kubler/factor7/web2py/applica
In my db.py I have a table definition with this field:
SQLField("foto","upload",label="Foto")
I can insert and edit the table with the generated t2 forms, but when
I try to delete a record that have an empty upload field, it fails
#edit function
def editar_hacker():
form=t2.update(db.hackers,n
Hello Massimo!
Thank you for your reply.
To clarify
SQL Server is properly detecting a duplicate value when it is
entered. It's Web2py's behavior when this
error is detected that I'm trying to change.
If you look at my original post again, I'm getting the error
"NameError: global name 'In
I'm using the webfaction hosting (Red Hat) and I haven't found
mysql.conf yet.
I didn't figure out the problem so I tried switching to postgres and
now it is fine.
On Jan 29, 2:31 pm, mdipierro wrote:
> Connections are closed outside the controller so it should not be a
> problem with your prog
probably you need
from pyodbc import IntegrityError
do not import it from psycopg since that is a different exception than
the one thrown by mssql
Massimo
On Jan 29, 2:38 pm, NetHead wrote:
> Hello Massimo!
>
> Thank you for your reply.
>
> To clarify
>
> SQL Server is properly detecting
This is a bug in t2 it will be fixed in the next version in a couple
of days.
Massimo
On Jan 29, 2:16 pm, mfolmos wrote:
> In my db.py I have a table definition with this field:
> SQLField("foto","upload",label="Foto")
> I can insert and edit the table with the generated t2 forms, but when
> I
i am currently working on synchronisation.
I have 2 or more "projectA" in different computers
and i would like to synchronise all the entries in the database from
different computers
when few entries are added into database.
so at the end, all the computer would have the same entries in the
datab
19 matches
Mail list logo