[web2py] A database design dillema

2012-07-11 Thread Najtsirk
Hello, I have a database design dilema. I want to do a e-learning system for a course. The course soould have severeal lessons, each lesson can be of different type. Let's say we have following model: #for definiton of each course db.define_table('course', Field('title', 'string')) #for

[web2py] Re: A database design dillema

2012-07-11 Thread Najtsirk
uly 2012 17:47:06 UTC-5, Najtsirk wrote: >> >> Hello, >> >> I have a database design dilema. I want to do a e-learning system for a >> course. The course soould have severeal lessons, each lesson can be of >> different type. >> >> Let's say we ha

[web2py] Re: A database design dillema

2012-07-11 Thread Najtsirk
Can i achieve that with joins? On Thursday, 12 July 2012 01:20:50 UTC+2, Najtsirk wrote: > > Yeah...i noticed that from your previous answers :) > > But...what my other options? > > On Thursday, 12 July 2012 01:13:06 UTC+2, Massimo Di Pierro wrote: >> >> Not in a

[web2py] Re: A database design dillema

2012-07-12 Thread Najtsirk
I plan to have homeworks also, which would have different data model than content course. I would like to put everything in the same timeline, whether is a course content (text, video) or course homework (questionnaires, uploads etc.). Let say steps 1-5 are course contents and than step 6 is h

[web2py] Re: A database design dillema

2012-07-12 Thread Najtsirk
t; > On Thursday, July 12, 2012 10:13:57 AM UTC+1, Najtsirk wrote: >> >> I plan to have homeworks also, which would have different data model than >> content course. I would like to put everything in the same timeline, >> whether is a course content (text, video)

[web2py] Re: A database design dillema

2012-07-12 Thread Najtsirk
I did manage to do this on my own. But the problem is ordering. I cannot get the records in the right order. I did manage to get the rows like: Table 1 - Record 1 Table 1 - Record 2 Table 1 - Record 3 Table 2 - Record 1 Table 2 - Record 2 Table 2 - Record 3 But how can i get output orderd by we

[web2py] Re: A database design dillema

2012-07-12 Thread Najtsirk
Thanks guys for your help. I went with Villas/Anthony's idea. On Thursday, 12 July 2012 00:47:06 UTC+2, Najtsirk wrote: > > Hello, > > I have a database design dilema. I want to do a e-learning system for a > course. The course soould have severeal lessons, each lesson ca

[web2py] weird behavior in crud update

2012-07-23 Thread Najtsirk
Hi, each time i want to update crud, i have to submit changes twice to get it actually updated. I set crud.settings.detect_record_change = False, which helps with 'text' fields, but the problem presists with 'boolean'. Boolean field get changed each time i update form, even though I do not cha

[web2py] Re: weird behavior in crud update

2012-07-24 Thread Najtsirk
12 23:55:49 UTC+2, Najtsirk wrote: > > Hi, > > each time i want to update crud, i have to submit changes twice to get it > actually updated. > > I set crud.settings.detect_record_change = False, which helps with 'text' > fields, but the problem presists with '

[web2py] Re: weird behavior in crud update

2012-07-24 Thread Najtsirk
I still have the same strange behaviour with SQLFORM.process(). On Monday, 23 July 2012 23:55:49 UTC+2, Najtsirk wrote: > > Hi, > > each time i want to update crud, i have to submit changes twice to get it > actually updated. > > I set crud.settings.detect_record_change

[web2py] Re: weird behavior in crud update

2012-07-24 Thread Najtsirk
est.args(0)).process() return dict(form=form) View: {{extend 'layoutno.html'}} textarea {width: 400px !important;} textarea#blog_vsebina {width: 650px !important;} .alert input {width: 150px !important;} Uredi blog zapis

[web2py] Re: crud.create causes an id problem

2012-05-12 Thread Najtsirk
I'm not too good at this stuff...but i think i had similar problem. In my controller I set the default value for the crud.create reference field: db.table.referenceid.default = request.args(0) form=crud.create(db.table) I solved the problem with: db.table.referenceid.default = *int*(reque

[web2py] How to eliminate app name from the url?

2013-04-06 Thread Najtsirk
Hi, i used Jonathan's suggestion about url redirection from 'www.domain.com' to 'domain.com'. In routes.py i set: routers = dict( # base router BASE=dict( default_application='welcome', domains = { 'domain.com' : 'myapp', 'www.domain.com' : 'myapp',

[web2py] Forwarding domain to a port

2012-01-12 Thread Najtsirk
Hi everybody, I successfully instaled web2py on my VPS. However, I have problem to forward my domain to port 8000. I can access web2py at www.mydomain.com:8000/welcome. How can I forward domain so that www.mydomain.com will actually show www.mydomain.com:8000/welcome? Best, Najtsirk

[web2py] Redactor, request.post_vars, $_FILES['file']

2013-07-13 Thread Najtsirk
Hi, I am struggling with implementation of image upload in Redactor wysiwyg. Does $FILES['file']['type'] corsponfs to request.post_vars.file.type ? Thanks for the anwser. Najtsirk -- --- You received this message because you are subscribed to the Google Groups &quo

[web2py] Re: Redactor, request.post_vars, $_FILES['file']

2013-07-13 Thread Najtsirk
*coresponds On Sunday, 14 July 2013 02:06:16 UTC+2, Najtsirk wrote: > > Hi, > > I am struggling with implementation of image upload in Redactor wysiwyg. > > Does $FILES['file']['type'] corsponfs to request.post_vars.file.type ? > > Thanks for the an

[web2py] Force include langauge in URL path

2016-10-16 Thread Najtsirk
Hi, ia have in routes.py: routers = dict( # base router BASE=dict( default_application='app', ), app=dict(languages=['en', 'it'], default_language='en') ) So this works just fine. If I go to my app: http://localhost:8000/app I see English site and if I go to http://lo

[web2py] list:reference, multiple=True vs. many-to-many with intermediate table

2014-01-17 Thread Najtsirk
Hi, I have a dilemma about *list:reference, multiple=True vs. many-to-many with intermediate table.* I have Projects which haveto be in several categories. Is it better to use list:reference (to list categories from the categories table) or many-to-many? Which is faster in queries? Thanks fo

[web2py] Re: list:reference or many-to-many

2014-01-17 Thread Najtsirk
x27;tags','list:string')) > Tag.connect(db.thing.tags) > > db.thing.insert(name='table', tags=['round','blue']) > print db(Tag.has_all(db.thing.tags,['round'])).select(db.thing.ALL) > print db(Tag.has_all(db.thing.tags,['blue

[web2py] Re: please help testing windows and mac binary

2014-03-20 Thread Najtsirk
Does not work on Win 7 Home Premium 64-bit On Thursday, 20 March 2014 17:16:13 UTC+1, Massimo Di Pierro wrote: > > problems have been reported with the windows and mac binaries for 2.9.x. > > Can you please help? > > Download the nightly builds: > http://web2py.com/examples/static/nightly/web2py_w

[web2py] Strange web2py book?

2014-03-23 Thread Najtsirk
Hi, is something wrong with this chapter? http://web2py.com/books/default/chapter/29/09/access-control Kristjan -- 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 Iss

[web2py] Re: @auth.requires_login() in the model instead of controller

2016-02-18 Thread Najtsirk
If I do understand you correct: you want to have in the same modal form: - if the user is logged in: a form for submitting a new Post; - if the user is not logged in: a login form. Is that correct? On Thursday, 18 February 2016 23:22:19 UTC+1, Ron Chatterjee wrote: > > Here in the picture

[web2py] Re: Regarding "registration needs verification"

2016-03-14 Thread Najtsirk
Do you get this error at the firs login (when user registers) or at the first login? Because, if you get it after the first login, this is correct behaviour. The user has to verify registrations. On Friday, 11 March 2016 16:21:43 UTC+1, Ramchandra Sharma wrote: > > Although the user is register

[web2py] Djano channels

2016-03-19 Thread Najtsirk
https://blog.heroku.com/archives/2016/3/17/in_deep_with_django_channels_the_future_of_real_time_apps_in_django Is there anything similar in web2py? I read about comet messaging. How these two compare? Thanks, Najtsirk -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Djano channels

2016-03-20 Thread Najtsirk
Thanks! On Sunday, 20 March 2016 07:15:11 UTC+1, pbreit wrote: > > Have you seen: > > https://github.com/web2py/web2py/blob/master/gluon/contrib/websocket_messaging.py > > On Thursday, March 17, 2016 at 2:48:08 PM UTC-7, Najtsirk wrote: >> >> >> https:

[web2py] Does web2py has samothing similar to Django's {% verbatim %} ?

2018-05-20 Thread Najtsirk
Does web2py have a tag to stop a section in the view from rendering tags? So i can use small Vue.js snippets? Thanks. K -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Rep

[web2py] SQLFORM does not submit,if displayed over jQuery load

2014-06-09 Thread Najtsirk
Hi, in my default.py i have a simple function: def edit_posts(): form=SQLFORM(db.postos, request.args(0)).process() return dict(form=form) On my posts page, i have a table of all posts with a button, that calls a SQLFORM with a jQuery load, like this: Edit Until here, everythin

[web2py] Re: SQLFORM does not submit,if displayed over jQuery load

2014-06-10 Thread Najtsirk
e URL of the parent page. Instead, your form must submit to the > edit_posts action, which means you need to trap the form submission and > submit it via Ajax as well. The easiest way to do this is to instead put > the form in a web2py component: > > Edit > > > > Anth

[web2py] How can I update a row dynamically from vars?

2014-07-12 Thread Najtsirk
Hi, let say that i pass vars id, field & value to a controller. Than I want to preform an update. def post_update(): ID = request.vars.id FIELD = request.vars.field VALUE = request.vars.value db(db.post.id==ID).update(FIELD=VALUE) This, obviously, does not work. How can I achieve th

Re: [web2py] How can I update a row dynamically from vars?

2014-07-13 Thread Najtsirk
E} > > db(db.post.id==ID).update(**data) > > > Note: this solution is pure Python. No feature from Web2py here. > > > > > On Sat, Jul 12, 2014 at 9:30 PM, Najtsirk > wrote: > > Hi, > > > > let say that i pass vars id, field & value to

[web2py] Re: How can I update a row dynamically from vars?

2014-07-13 Thread Najtsirk
No, this does not work. Best, Kristjan On Sunday, 13 July 2014 08:12:57 UTC+2, Annet wrote: > > Doesn't this work? > > db.post(id=ID).update_record(FIELD=VALUE) > > > Regards, > > Annet > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web

[web2py] Powered by Web2py: www.sklad05.si

2014-08-09 Thread Najtsirk
Hi, just wanna share my site I've made with web2py www.sklad05.si Best, Kristjan -- 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 messa

[web2py] Re: Powered by Web2py: www.sklad05.si

2014-08-09 Thread Najtsirk
, I think. > > If you don't mind my asking, what CSS/javascript magic are you using? Or > is it all htm5? > > On Saturday, August 9, 2014 11:16:24 AM UTC-4, Najtsirk wrote: >> >> Hi, >> >> just wanna share my site I've made with web2py www.skla

[web2py] Web2py + AngularJS: routes

2014-08-14 Thread Najtsirk
Hello, i have problem with Web2py and AngularJS regarding routes. Where should be partial .html files of specific routes stored? In static folder? Best, Kristjan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https:

[web2py] Re: Web2py + AngularJS: routes

2014-08-15 Thread Najtsirk
html. For > example: > > def jqplot(): > # This method is necessary to allow views/home/jqplot.html to be > rendered > response.delimiters = ('{[',']}') > return dict() > > On Thursday, August 14, 2014 3:41:19 PM UTC-5, Najtsirk wrote:

[web2py] Re: Web2py + AngularJS: routes

2014-08-16 Thread Najtsirk
}); > }]); > > No need to specify index.html anywhere in the routing. > > I had a controller angularStore.py and so all the htmls (including > index.html) are in folder: > views/angularStore > > On Friday, August 15, 2014 11:59:29 AM UTC-5, Najtsirk wrote:

[web2py] Insert into db.table after user registration

2014-10-08 Thread Najtsirk
Hello, i would like to insert a record in db.table when a user registration is performed. How to achieve that? Best, Kristjan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/lis

[web2py] Re: Insert into db.table after user registration

2014-10-08 Thread Najtsirk
Thanks. On Wednesday, 8 October 2014 15:47:46 UTC+2, Leonel Câmara wrote: > > auth.settings.register_onaccept > -- 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

[web2py] Dilemma: how to store reports

2015-03-09 Thread Najtsirk
Dear Web2pyers, I have dilemma not connected directly to Web2py. I am running / developing a web application where different projects seek impact investments and donations. Each project is obliged to submit a report by the end of the year. For the first two years we accepted written reports

[web2py] Re: web2py 2.10.1 is OUT

2015-04-01 Thread Najtsirk
*When I create new simple application, i get this error:* SyntaxError: define_table argument is not a Field or Table: .is_active On Wednesday, 1 April 2015 00:26:18 UTC+2, Massimo Di Pierro wrote: > > - welcome app defaults to Bootstrap 3 > - DAL -> pyDAL (thanks Giovanni, Niphlod, Paolo) >

[web2py] Web2py 2.10.1 error: define_table argument is not a Field or Table

2015-04-01 Thread Najtsirk
Hi, i get this error with Web2py 2.10.1 on all applications: syntaxError: define_table argument is not a Field or Table: . is_active Don't know how to fix it. Best, kristjan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source co

[web2py] Re: Web2py 2.10.1 error: define_table argument is not a Field or Table

2015-04-01 Thread Najtsirk
It's not working for me. On Wednesday, 1 April 2015 13:28:38 UTC+2, rif wrote: > > I fixed this by deleting the welcome app and replacing it with the one > from the latest version. > > miercuri, 1 aprilie 2015, 13:29:24 UTC+3, Najtsirk a scris: >> >> Hi, >>

[web2py] Re: Web2py 2.10.1 error: define_table argument is not a Field or Table

2015-04-01 Thread Najtsirk
prilie 2015, 15:25:58 UTC+3, Najtsirk a scris: >> >> It's not working for me. >> >> On Wednesday, 1 April 2015 13:28:38 UTC+2, rif wrote: >>> >>> I fixed this by deleting the welcome app and replacing it with the one >>> from the lates

[web2py] Is there any example or plugin for threaded comments?

2015-04-01 Thread Najtsirk
HI, I am searching for the best solution for threaded comments. Do anybody of you have plugin or at least example of implementation? Best, Kristjan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.c

[web2py] Re: Is there any example or plugin for threaded comments?

2015-04-01 Thread Najtsirk
32 UTC+2, Massimo Di Pierro wrote: > > Not as I would do it today but this old app had threaded comments: > https://github.com/mdipierro/web2py-appliances/tree/master/RedditClone > > On Wednesday, 1 April 2015 15:18:26 UTC-5, Najtsirk wrote: >> >> HI, >> >> I

[web2py] Re: Best way to manage a cart

2015-04-06 Thread Najtsirk
I use session storage for cart until checkout. You can find an example from Massimo here: https://github.com/mdipierro/web2py-appliances/tree/master/EStore I was studying this before implementing my own solution. Best, K. On Monday, 6 April 2015 21:08:25 UTC+2, Gael Princivalle wrote: > > Hel

[web2py] Last version of plugin_wiki?

2015-04-07 Thread Najtsirk
Hi guys, where can I get the latest version of plugin_wiki? Best, K -- 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 y

[web2py] SQLFORM: how to show image thumbnail

2017-02-20 Thread Najtsirk
Hi, i have the following problem. *Model:* db.define_table('person', Field('name', 'string', label='Name'), Field('image','upload', label='Image', autodelete=True, uploadfolder=os.path.join(request.folder, 'uploads/persons')) *Controller:* def person(): form = SQLFORM(db.person, r

[web2py] Semantic UI for SQLFROM.grid

2017-05-26 Thread Najtsirk
Hi, I would like to have Semantic UI in my application. However the SQLFORM.grid has Bootstrap by default. Is there "the right" way to implement SQLFORM.grid with SemanticUI? Can somebody point me into the right direction? Thanks, Kristjan -- Resources: - http://web2py.com - http://web2py.co

[web2py] Re: 'Column table.id not found (SQLTABLE)'

2017-06-03 Thread Najtsirk
+1 Have this problem too! On Saturday, 3 June 2017 18:13:18 UTC+2, Maurice Waka wrote: > > Hi did anyone get to solve this error? I seem to be locked in it also > Regards > > On Monday, March 20, 2017 at 4:39:13 PM UTC+3, Santiago Cartasegna wrote: >> >> Are you trying to use a table that you have

[web2py] Re: 'Column table.id not found (SQLTABLE)'

2017-06-03 Thread Najtsirk
I checked this and I had pydal installed as a global module. When I removed it web2py's DAL works ok. On Saturday, 3 June 2017 18:30:05 UTC+2, Najtsirk wrote: > > +1 > Have this problem too! > > On Saturday, 3 June 2017 18:13:18 UTC+2, Maurice Waka wrote: >> >>

[web2py] Best practice regarding applications

2017-09-01 Thread Najtsirk
Hello, after a long years of active use of web2py it came to me that probably I am not doing it as it should! :) So within one web2py i have several applications and each one is acctualy a separate site ona a different domain. Is this best pracitce or should i have one web2py instance for ever

[web2py] Re: Best practice regarding applications

2017-09-07 Thread Najtsirk
inx+uwsgi or gevent or gunicorn > and have about one process per core. > > On Friday, 1 September 2017 05:17:42 UTC-5, Najtsirk wrote: >> >> Hello, >> >> after a long years of active use of web2py it came to me that probably I >> am not doing it as it s

[web2py] How to use record.id in upload path?

2015-05-25 Thread Najtsirk
Dear all, let's say the model is: import os db.define_table('project', Field('title', 'string'), Field('photo','upload', uploadfolder=os.path.join(request.folder,'upload/project/'), autodelete=True)) How can I include record.id in the uploadfolder path so a can have separatesubfold

[web2py] Re: How to use record.id in upload path?

2015-06-05 Thread Najtsirk
web2py's > built-in upload mechanism, you would have to manually manage the uploads > after record insertion. > > Anthony > > On Monday, May 25, 2015 at 11:29:54 AM UTC-4, Najtsirk wrote: >> >> Dear all, >> >> let's say the model is: >

[web2py] Locking app to a single domain

2015-06-05 Thread Najtsirk
I have define routes like this: routers = dict( BASE = dict( domains = { 'domain1.com' : 'app1', 'domain2.com' : 'app2', } ), ) which works OK. However, there is a thing, that I would like to avoid. If i acces: domain1.com/*app2*, i get app2. Is there a way

[web2py] Re: Locking app to a single domain

2015-06-05 Thread Najtsirk
Did you mean to put this into specific app? This does not work, because router redirects to different app. On Friday, 5 June 2015 17:17:48 UTC+2, villas wrote: > > Maybe something like this (untested)... > > --- in models/0redirects.py --- > if request.application in ['app2','app3']: > redir

[web2py] Re: Locking app to a single domain

2015-06-10 Thread Najtsirk
models/0redirects.py (your first model) check the >> domain and app name are correct. If not, redirect, or whatever you wish >> to happen. >> >> Hopefully, someone will provide an answer based on routes.py >> >> All the best, D >> >> >>

[web2py] Re: What if Massimo got hit by a Bus?

2015-06-26 Thread Najtsirk
Massimo got a motorbike. On Thursday, 26 May 2011 16:15:17 UTC+2, Bob Blanchett wrote: > > I just read this presentation by by GvR/BDFL > > > on 21 years of Python and wondered for Web2py as some one did for > P

[web2py] SQLFORM.grid different classes for add and edit forms

2015-08-10 Thread Najtsirk
Hello, is it possible to assign different classes for add and edit forms in SQLFORM.grid? A this point there is no difference between them so I cannot use proper CSS selectors for JS. Best, Najtsirk -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http

[web2py] Proposal: Documentation in form of a wiki

2015-08-17 Thread Najtsirk
short article to wiki about it. Maybe wouldn't be a perfect solutions but somebody else could build upon it and make better example. Best, Najtsirk -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -