[web2py] importing models into modules

2017-01-15 Thread LightOfMooN
Hello! How can I import some function from models to my module? for example: mymodel.py: def func1(): return 'qwe' how to call this function from mymodule.py? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Cross domain auth

2015-12-28 Thread LightOfMooN
Monday, December 28, 2015 at 12:51:22 AM UTC-5, LightOfMooN wrote: >> >> But is there a way to push session cookie for multiple domains at once? >> Something like: >> >> for domain in ['mydomain.com', 'mydomain.de', 'mydomain.ru', 'mydomain.fr']: >> >

[web2py] Cross domain auth

2015-12-27 Thread LightOfMooN
Hello. I have multiple domains, that slice *one *app by languages. For example: mydomain.com mydomain.fr mydomain.de mydomain.ru etc If the user login to app in mydomain.com and then want to read it in Deutch, he switches to DE-version with redirecting to mydomain.de, but, unfortunately, he

[web2py] Re: Cross domain auth

2015-12-27 Thread LightOfMooN
2015 г., 5:36:42 UTC+5 пользователь Anthony написал: > > The problem is the browser will not send the session cookie to the new > domain, so web2py has no way to know the user has been logged in. > > On Sunday, December 27, 2015 at 3:12:48 PM UTC-5, LightOfMooN wrote: >> &

[web2py] Scheduler TIMEOUT

2013-11-12 Thread LightOfMooN
How to disable timeout in scheduler? I'm using scheduler to update availability of thing from supplier site. So, I parse supplier's site, and when one url not loaded, scheduler task get status 'TIMEOUT' and stops all work. It's really bad, because there are thousands things in database, and I

[web2py] Re: Scheduler TIMEOUT

2013-11-12 Thread LightOfMooN
I don't want worker without timeout. I just want scheduler task not to be stopped because of timeout from one of thousands records. Why scheduler doesn't execute tasks with status=='TIMEOUT'? I have some function like: thing = db.executesql(db(db.things.id0)._select(...,

[web2py] Re: Google Chrome and the editor

2013-10-13 Thread LightOfMooN
Try to Ctrl+F5 воскресенье, 13 октября 2013 г., 12:54:58 UTC+6 пользователь mweissen написал: The file editor does not show any lines of text in Google Chrome (see the attached screen shot) I have: - A new copy of 2.7.1, updated to 2.7.3 - Operating System: Windows 7 - Google

[web2py] Re: codemirror tabbing problem

2013-10-12 Thread LightOfMooN
fixed by adding extraKeys in admin/views/edit.html: CodeMirror.defaults.extraKeys[Tab] = indentMore; CodeMirror.defaults.extraKeys[Shift-Tab] = indentLess; вторник, 5 марта 2013 г., 20:19:48 UTC+6 пользователь LightOfMooN написал: How to disable wrong codemirror smart-tabbing? It really makes

[web2py] 2.6.4 routes out does not work with decorators

2013-10-11 Thread LightOfMooN
routes_out = ( ('/$app/$anything', '/$anything'), ('/test/$anything', '/$anything'), ) App_name test controller hello: @auth.requires(lambda: auth.has_membership(role='admin')) def function world: return dict() in hello/world.html: {{=URL('test','hello','world')}} which

[web2py] Re: 2.6.4 routes out does not work with decorators

2013-10-11 Thread LightOfMooN
On v 2.7.2 still not work пятница, 11 октября 2013 г., 16:10:44 UTC+6 пользователь LightOfMooN написал: routes_out = ( ('/$app/$anything', '/$anything'), ('/test/$anything', '/$anything'), ) App_name test controller hello: @auth.requires(lambda: auth.has_membership(role='admin

[web2py] Re: 2.6.4 routes out does not work with decorators

2013-10-11 Thread LightOfMooN
, self.settings.login_url + '?_next=' + urllib.quote(next)) пятница, 11 октября 2013 г., 16:10:44 UTC+6 пользователь LightOfMooN написал: routes_out = ( ('/$app/$anything', '/$anything'), ('/test/$anything', '/$anything

[web2py] Re: 2.6.4 routes out does not work with decorators

2013-10-11 Thread LightOfMooN
Ok, I found the solution. Now all works fine. Problem was in Here() function. Tools.py line 1126: def here(self): return current.request.env.request_uri I replaced it with: *def here(self):* *return URL(args=current.request.args,vars=current.request.vars)* And all works

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
In v 2.7.2 don't work redirects after login and logout. How to fix it? четверг, 27 июня 2013 г., 19:36:27 UTC+6 пользователь roy...@gmx.de написал: hello together, my problem is , i want a simply redirect after a user is logged in. i am using the auth setup from web2py: my db.py:

[web2py] Newer version worse and worse

2013-10-11 Thread LightOfMooN
It's really headache for me with new 2.7.2 version of web2py. There are no more redirects after users login and logout. Double click in mirror editor on empty string leads to crash browser. (fixed by removing script src={{=cm}}/mode/clike/clike.js/script from admin/views/default/edit.html)

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
UTC+2, LightOfMooN wrote: In v 2.7.2 don't work redirects after login and logout. How to fix it? четверг, 27 июня 2013 г., 19:36:27 UTC+6 пользователь roy...@gmx.deнаписал: hello together, my problem is , i want a simply redirect after a user is logged in. i am using the auth setup from

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
it doesn't wok with logout? Linking your logout to /default/user/logout should log user out and simply redirect to default/index. Do you want to redirect user to other URL with /default/user/logout ? On Friday, October 11, 2013 6:58:45 PM UTC+2, LightOfMooN wrote: Yes, I tried. It works

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
')}}Logout/a This also does not redirect to default/index when clicked? On Friday, October 11, 2013 7:15:03 PM UTC+2, LightOfMooN wrote: def logout(): auth_logout = auth.logout(next=URL('default', 'index')) return dict(auth_logout = auth_logout) in template: {{=auth_logout

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
most probably a bug. Give the guys time to fix it or move back to previous stable version. On Friday, October 11, 2013 9:10:12 PM UTC+2, LightOfMooN wrote: I use just such link. But the problem is, that when user click on it, He logout and stays on /default/user/logout page. It's terrible

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
., 23:15:03 UTC+6 пользователь LightOfMooN написал: def logout(): auth_logout = auth.logout(next=URL('default', 'index')) return dict(auth_logout = auth_logout) in template: {{=auth_logout}} And it returns None and no redirects. Other variation: def user(): return dict

[web2py] Re: Newer version worse and worse

2013-10-11 Thread LightOfMooN
OS Ubuntu 12.04 Tested browsers Firefox 24.0 and Google Chrome 30.0.1599.69 m суббота, 12 октября 2013 г., 4:14:28 UTC+6 пользователь Massimo Di Pierro написал: Let's keep this thread about the problem with the editor. @LightOfMooN, please send us more info about browser and os

Re: [web2py] Newer version worse and worse

2013-10-11 Thread LightOfMooN
tags for 5 years: *left_arrow*div *left_arrow* /div. So, i expect to get div/div, but I get div/divdiv instead. I want to decide myself, when to open and when to close tags. суббота, 12 октября 2013 г., 3:40:27 UTC+6 пользователь Roberto Perdomo написал: El oct 11, 2013 8:25 AM, LightOfMooN

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
So, that Ubuntu 12.04 web2py 2.7.2 http://welcome.all-shops.info Try to login and logout with profile email: he...@world.com password: helloworld And see, that redirects don't work. Administrative interface: https://all-shops.info/admin/ Password for administrative interface: helloworld --

[web2py] Re: Newer version worse and worse

2013-10-11 Thread LightOfMooN
you have an incomplete installation. Did you upgrade via admin? I suggest you get a clean web2py_src.zip and unzip over the existing one. Anyway, wait one hour and I will have a 2.7.3 with fixes for other small issues. Massimo On Friday, 11 October 2013 17:52:12 UTC-5, LightOfMooN

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
sure you change the password immediately. Massimo On Friday, 11 October 2013 17:49:24 UTC-5, LightOfMooN wrote: I changed in gluon/tools.py line 2421: next = self.settings.logout_next with: next = self.get_vars_next() And now logout redirects users, if there is _next var

[web2py] codemirror tabbing problem

2013-03-05 Thread LightOfMooN
How to disable wrong codemirror smart-tabbing? It really makes me angry when I'm coding. smartIndent: false don't help. I need tabbing like in the editArea, where tab makes +4 spaces for all selected lines and shift+tab makes -4 spaces for all selected lines. thx -- --- You received this

[web2py] Re: routes.py not working in 2.0.9

2012-10-25 Thread LightOfMooN
Hello. I have routes_in = ( ('/admin/$anything', '/admin/$anything'), ('(?Panything.*)/appadmin/(?Panything2.*)', '\ganything/appadmin/\ganything2'), ('.*://.*mydomain.com:.* /$anything', '/welcome/$anything'), ) routes_out = ( ('(?Panything.*)/admin/(?Panything2.*)',

[web2py] Re: routes.py not working in 2.0.9

2012-10-25 Thread LightOfMooN
I wrote routes.py from the book: routes_in = ( ('/testme', '/examples/default/index'), )routes_out = ( ('/examples/default/index', '/testme'), ) And go to mydomain.com/testme and get Request Error. But if i check href attribute from examples app link in admin, it's 'mydomain.com/testme'

Re: [web2py] Re: routes.py not working in 2.0.9

2012-10-25 Thread LightOfMooN
Current pattern-based system is perfect. We made more than 20 projects with it. But it does not work on new web2py version (2.2.1). We used 1.99.7 before. четверг, 25 октября 2012 г., 18:23:13 UTC+5 пользователь Massimo Di Pierro написал: We'll change them in web3py. Suggestions? On

[web2py] Re: Movie not loaded... problem with flash

2012-10-03 Thread LightOfMooN
I have the same problem, which I solved by this way: def download(): if (request.args(0) or '').endswith('swf'): from cStringIO import StringIO import os import time response.headers['Content-Disposition'] = '' filename =

[web2py] Re: Movie not loaded... problem with flash

2012-10-03 Thread LightOfMooN
response.download(request,db) среда, 3 октября 2012 г., 22:31:30 UTC+5 пользователь LightOfMooN написал: I have the same problem, which I solved by this way: def download(): if (request.args(0) or '').endswith('swf'): from cStringIO import StringIO import os import

[web2py] Re: web2py performance

2012-02-07 Thread LightOfMooN
problem solved by using rows = db.executesql(db(db.mytable.id0)._select(db.mytable.myfield, db.mytable.id)) seems time is going to 0 ms It's some hard to coding without dictionaries, but really much faster for big massive of data On 7 фев, 12:24, LightOfMooN vladsale...@yandex.ru wrote: Hi Just

[web2py] web2py performance

2012-02-06 Thread LightOfMooN
Hi Just download web2py, run it and go to edit welcome app. in db.py: db.define_table('mytable',Field('myfield','string')) in controllers/default.py: def index(): if request.vars.add_rows: for i in xrange(10): db.mytable.insert(myfield='') rows =

[web2py] Re: web2py performance

2012-02-06 Thread LightOfMooN
wrote: You are using a for loop with 10 inserts it is the for loop holding you up not web2py. Plus who in their right mind would code something like that in production On Feb 6, 2012 11:24 PM, LightOfMooN vladsale...@yandex.ru wrote: Hi Just download web2py, run it and go to edit

[web2py] random and limitby in joins

2011-11-16 Thread LightOfMooN
For example, I have this database structure: db.define_table('sections', Field('title', 'string') ) db.define_table('threads', Field('title', 'string'), Field('section_id', db.sections), ) How can I get all sections and by 1 random thread per each section? This works: rows =

[web2py] Re: random and limitby in joins

2011-11-16 Thread LightOfMooN
: select(...,orbderby='random',limitby=(0,3)) On Nov 16, 2:27 am, LightOfMooN vladsale...@yandex.ru wrote: For example, I have this database structure: db.define_table('sections',     Field('title', 'string')     ) db.define_table('threads',     Field('title', 'string'),     Field

[web2py] subdomain auth with appadmin

2011-09-04 Thread LightOfMooN
I have app with multi subdomain structure I use response.cookies[response.session_id_name]['domain'] = .domain.ru in db.py to make single auth at all subdomains But that broke appadmin. Any solutions?

[web2py] Re: web2py hosting

2011-07-31 Thread LightOfMooN
linode the best $) have 7 web2py sites on it, and all works fine On 31 июл, 22:06, Web2Py Freak halna...@gardeniatelco.com wrote: when am hosting a web2py website  .. am going to use a python hosting ??? and i didnt find anything about hosting sqlite  ?? help guys am confused .

[web2py] Re: login problem

2011-07-10 Thread LightOfMooN
Also nothing happens On 10 июл, 02:42, Anthony abasta...@gmail.com wrote: What happens if you remove vars=request.vars from LOAD()? On Jul 9, 11:52 am, LightOfMooN vladsale...@yandex.ru wrote: ajax=True doesn't work too I make it clear: layout.html {{=LOAD('default','login2

[web2py] login problem

2011-07-09 Thread LightOfMooN
Hello. I'm trying to make a login viewlet. So, I have function in controller default: def login(): return dict(form=auth.login()) And view: div id=log_menu {{if not auth.user:}} form action= enctype=multipart/form-data method=POST div Logininput name=username type=text value=

[web2py] Re: login problem

2011-07-09 Thread LightOfMooN
submission back to the login() action. Or you can just use ajax=True for the login component. Anthony On Saturday, July 9, 2011 9:06:17 AM UTC-4, LightOfMooN wrote: Hello. I'm trying to make a login viewlet. So, I have function in controller default: def login():     return dict

[web2py] Re: login problem

2011-07-09 Thread LightOfMooN
everything manually, as described here:http://web2py.com/book/default/chapter/07#Custom-forms. For example, form.custom.end will do the same thing as form.hidden_fields(), but will also add the closing /form tag. Anthony On Saturday, July 9, 2011 9:52:17 AM UTC-4, LightOfMooN wrote: So, I

[web2py] Re: Error on LOAD() in trunk

2011-07-04 Thread LightOfMooN
+1 to that. I have 1.97.1 and it has the problem with request.vars in LOAD(ajax=False) Then I install d4c2d8d15bb1 rev. from trunk. checking request.vars in LOAD(ajax=False) doesn't rises an error anymore, but there was no vars in all LOAD(ajax=False) functions. So, I think, current request

[web2py] Re: Error on LOAD() in trunk

2011-07-04 Thread LightOfMooN
No more copy error, but also no vars of current request passing to LOAD(ajax=False) =\ On 4 июл, 20:14, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I just made some changes in trunk. Can you give it a try? On Jul 4, 3:45 am, LightOfMooN vladsale...@yandex.ru wrote: +1

[web2py] Re: Error on LOAD() in trunk

2011-07-04 Thread LightOfMooN
I made little app to test it: http://ifolder.ru/24534498 there should be test string, if to click on test button On 4 июл, 22:19, LightOfMooN vladsale...@yandex.ru wrote: No more copy error, but also no vars of current request passing to LOAD(ajax=False) =\ On 4 июл, 20:14, Massimo Di Pierro

[web2py] Re: Error on LOAD() in trunk

2011-07-04 Thread LightOfMooN
Thank you! Now it works fine. On 5 июл, 03:53, Anthony abasta...@gmail.com wrote: On Monday, July 4, 2011 5:51:04 PM UTC-4, Anthony wrote: The same goes for request.args -- if you want the args for the component to be the same as those for the parent page, you have to add args=request.args

[web2py] Re: Error on LOAD() in trunk

2011-07-03 Thread LightOfMooN
00 Preface whilst always maintaining backward compatibility Please, return previous ajax=False functionality (with passing current request to all LOAD(ajax=False) functions). It's a really important feature for component development. I have 2 sites broken because of it. =\ On 3 июл, 08:45,

[web2py] Re: Error on LOAD() in trunk

2011-07-03 Thread LightOfMooN
say please how to do it, thx On 4 июл, 00:01, pbreit pbreitenb...@gmail.com wrote: For now, you can revert back to changeset d4c2d8d15bb1 although I'm not sure if that will cause other problems.

[web2py] Re: Error on LOAD() in trunk

2011-07-02 Thread LightOfMooN
use ajax=True. I am not sure ajax=False should be an option al all. On Jul 1, 11:45 am, LightOfMooN vladsale...@yandex.ru wrote: Thx, but I just disabled some components until the new stable version of webpy :) On 1 июл, 21:29, Anthony abasta...@gmail.com wrote: That problem

[web2py] Re: Error on LOAD() in trunk

2011-07-02 Thread LightOfMooN
you prefer ajax=False to ajax=True? What advantages do you expect? On Jul 2, 1:28 am, LightOfMooN vladsale...@yandex.ru wrote: ajax=False is very important for me, so, I like 1.96 more than 1.97 :) I use it at most interactive components, that can be displayed on the all pages of site

[web2py] Re: Error on LOAD() in trunk

2011-07-02 Thread LightOfMooN
Yes, I can include templates with {{include}}, but I can't process vars by that way. On 2 июл, 23:38, pbreit pbreitenb...@gmail.com wrote: I don't know if this would work for you but you can compartmentalize view snippets and {{include}} them: {{include './html/item-box.html'}} I have zero

[web2py] Re: Error on LOAD() in trunk

2011-07-01 Thread LightOfMooN
Hello, just updated web2py to 1.97.1 and one of my sites crashed with the same problem: {{=LOAD('voting', 'voting_viewlet', ajax=False)[0][0]}} too bad On 1 июл, 01:10, pbreit pbreitenb...@gmail.com wrote: Any ideas on this one? Has anyone else had problems with LOAD(ajax=False) in trunk? I

[web2py] Re: Error on LOAD() in trunk

2011-07-01 Thread LightOfMooN
def voting_viewlet(): return dict() works fine But if I try to check request.vars, it crashes: def voting_viewlet(): if request.vars.vote: pass return dict() rises an error On 1 июл, 20:46, LightOfMooN vladsale...@yandex.ru wrote: Hello, just updated web2py to 1.97.1

[web2py] Re: Error on LOAD() in trunk

2011-07-01 Thread LightOfMooN
so, request has no vars storage On 1 июл, 20:53, LightOfMooN vladsale...@yandex.ru wrote: def voting_viewlet():     return dict() works fine But if I try to check request.vars, it crashes: def voting_viewlet():     if request.vars.vote:         pass     return dict() rises an error

[web2py] Re: Error on LOAD() in trunk

2011-07-01 Thread LightOfMooN
, July 1, 2011 10:57:13 AM UTC-4, LightOfMooN wrote: so, request has no vars storage On 1 июл, 20:53, LightOfMooN vlads...@yandex.ru wrote: def voting_viewlet():     return dict() works fine But if I try to check request.vars, it crashes: def voting_viewlet

[web2py] select with joining first referenced field

2011-06-13 Thread LightOfMooN
db.define_table('things', Field('title', 'string'), ) db.define_table('photos', Field('thing_id', db.things), Field('photo', 'upload'), ) Is there a way to get all things and just one photo per thing? Something like: rows = db(db.things.id0).select(db.things.ALL,

[web2py] Re: request.is_local

2011-06-07 Thread LightOfMooN
ajax=True ofcourse doesn't work, because it's loads after response page. [0][0] is to unwrap loaded content On 7 июн, 13:43, pbreit pbreitenb...@gmail.com wrote: Does it work if ajxa=True? What are the [0][0] for?

[web2py] Re: request.is_local

2011-06-07 Thread LightOfMooN
=smth)     else:         return None Anthony On Tuesday, June 7, 2011 1:32:43 AM UTC-4, LightOfMooN wrote: What is logic of request.is_local? I tried use it to prevent direct access to some included blocks: def index():     return dict() def some_block

[web2py] request.is_local

2011-06-06 Thread LightOfMooN
What is logic of request.is_local? I tried use it to prevent direct access to some included blocks: def index(): return dict() def some_block(): if request.is_local: do_smth() return dict(smth=smth) else: return None index.html: {{=LOAD('mycontroller',

[web2py] strange problem with upper(), lower() and capitalize()

2011-05-23 Thread LightOfMooN
Why upper(), lower() and capitalize() doesn't work on this: asd = str(document.title) response.flash = (asd + 'world').upper() document.title is 'hello' so, the result is: 'helloWORLD'

[web2py] query question

2011-05-05 Thread LightOfMooN
db.define_table('things', Field('title', 'string'), ) db.define_table('photos', Field('title', 'string'), Field('image', 'upload', autodelete=True), ) db.define_table('photos_things', Field('thing_id', db.things), Field('photo_id', db.photos), ) Is there a way to

[web2py] Re: query question

2011-05-05 Thread LightOfMooN
But it will be the list with dublicates of thing? for example: [[thing_1, photo_1],[thing_1, photo_2],[thing_1, photo_3],[thing_2, photo_4],[thing_2, photo_5]] But I need unique things with just one or zero photo per thing, like: [[thing_1, photo_1],[thing_2, photo_4], [thing_3, None]] On 5 май,

[web2py] Re: routes_out protocol

2011-05-04 Thread LightOfMooN
, LightOfMooN vladsale...@yandex.ru wrote: The problem is because urls is relative, not absolute. My problem is: If I have https and I'm in sub1.domain.ru, I can't make urlhttps://sub2.domain.ru, because I can't catch protocol inroutes_out, like ('$protocol*://domain\.ru:.* /myapp

[web2py] Re: cyrillic in routes

2011-04-18 Thread LightOfMooN
gluon/rocket.py There is a sample WSGI app at the bottom of this file (rocket.py) print environ and check what it contains. On Apr 17, 11:15 am, LightOfMooN vladsale...@yandex.ru wrote: Web2py is on Ubuntu 10.4 I have windows 7 (so, there is cp1251) So, if i check cyrillic value

[web2py] cyrillic in routes

2011-04-17 Thread LightOfMooN
Hello I need to route by cyrillic domain to my app How can I do that? Seems, routes don't work with unicode. I need something like: routes_in = ( (ur'/привет', r'/hello/default/index'), )

[web2py] Re: cyrillic in routes

2011-04-17 Thread LightOfMooN
utf8 for now. On Apr 17, 9:45 am, LightOfMooN vladsale...@yandex.ru wrote: Hello I need to route by cyrillic domain to my app How can I do that? Seems, routes don't work with unicode. I need something like: routes_in = (     (ur'/привет', r'/hello/default/index'), )

[web2py] Re: cyrillic in routes

2011-04-17 Thread LightOfMooN
, LightOfMooN vladsale...@yandex.ru wrote: Could you please explain, how I should do it? I try like: routes_in = ( ('/xn--h1acfjl4f.xn--p1ai', r'/hello/default/index') ) and routes_in = ( ('/привет', r'/hello/default/index') ) but it seems not work On 17 апр, 20:49

[web2py] Re: cyrillic in routes

2011-04-17 Thread LightOfMooN
It's s strange There is 2 rules 1) (r'.*://\xd1\x80\xd0\xb8\xd0\xbb\xd1\x8d\xd0\xb9\xd0\xbd\. \xd1\x80\xd1\x84:.* /?', r'/myapp/default/index'), 2) (r'/\xd1\x80\xd0\xb8\xd0\xbb\xd1\x8d\xd0\xb9\xd0\xbd\. \xd1\x80\xd1\x84', r'/myapp/default/index'), 2nd works fine, but not 1st. I can't

[web2py] Re: cyrillic in routes

2011-04-17 Thread LightOfMooN
request.env.http_host 'xn--h1acfjl4f.xn--p1ai' So, domain not in utf-8 How to route it? On 17 апр, 21:47, LightOfMooN vladsale...@yandex.ru wrote: It's s strange There is 2 rules 1) (r'.*://\xd1\x80\xd0\xb8\xd0\xbb\xd1\x8d\xd0\xb9\xd0\xbd\. \xd1\x80\xd1\x84:.* /?', r'/myapp/default/index

[web2py] Re: cyrillic in routes

2011-04-17 Thread LightOfMooN
, that web2py can't work with cyrillic symbols in url for now :( On 17 апр, 21:58, Massimo Di Pierro massimo.dipie...@gmail.com wrote: what is the encoding? What is the os? I do not think a domain may contain chars that are not expressible in utf8 but I may be wrong. On Apr 17, 10:51 am, LightOfMooN

[web2py] Re: subdomain auth

2011-04-11 Thread LightOfMooN
, LightOfMooN vladsale...@yandex.ru wrote: No solutions for that? On 10 апр, 23:18, LightOfMooN vladsale...@yandex.ru wrote: Hello. I have site based on subdomains, but all of them are the one project. for example: city1.cities.ru city2.cities.ru city3.cities.ru if I

[web2py] Re: subdomain auth

2011-04-11 Thread LightOfMooN
We just use web2py auth in our site, and not manual manage cookies. On 11 апр, 21:56, Mengu whalb...@gmail.com wrote: are you saving the cookies in cities.ru domain but not per subdomain? On Apr 11, 6:40 pm, LightOfMooN vladsale...@yandex.ru wrote: But that is in all browsers (we try

[web2py] Re: subdomain auth

2011-04-11 Thread LightOfMooN
for sessions and security). You might also need some logic so the domain is not set when running on localhost. Anthony On Monday, April 11, 2011 11:40:34 AM UTC-4, LightOfMooN wrote: But that is in all browsers (we try IE, FF, Chrome, Safari). I have seen many sites with subdomain structure

[web2py] routes_out protocol

2011-04-11 Thread LightOfMooN
Hello I have some records in my routes.py in routes_in: (r'.*://$sub\.domain\.ru:.* /?', r'/myapp/company/index/$sub'), in routes_out: ('/myapp/company/index/$sub', 'http://$sub.domain.ru'), So, routes_in workds fine, but routes_out works only by http. Is there a way to get protocol in

[web2py] Re: subdomain auth

2011-04-11 Thread LightOfMooN
, or did you have to use the multi-application method Massimo suggested? On Monday, April 11, 2011 12:42:50 PM UTC-4, LightOfMooN wrote: Oh, Anthony, Massimo It works! Thanks you a lot! On 11 апр, 22:29, Massimo Di Pierro massimo@gmail.com wrote: True. So perhaps this should do

[web2py] Re: routes_out protocol

2011-04-11 Thread LightOfMooN
'), On 11 апр, 23:45, Jonathan Lundell jlund...@pobox.com wrote: On Apr 11, 2011, at 10:13 AM, LightOfMooN wrote: Hello I have some records in my routes.py in routes_in:    (r'.*://$sub\.domain\.ru:.* /?', r'/myapp/company/index/$sub'), in routes_out:    ('/myapp/company/index/$sub

[web2py] Re: subdomain auth

2011-04-11 Thread LightOfMooN
Yes, you are right! I still work with only response.cookies[response.session_id_name]['domain'] = .domain.ru On 12 апр, 00:22, Anthony abasta...@gmail.com wrote: On Monday, April 11, 2011 2:05:34 PM UTC-4, LightOfMooN wrote: No, it just a single application I just add to my db.py

[web2py] subdomain routing

2011-04-10 Thread LightOfMooN
Hello. I just want to pass subdomain as args(0) So I have now: routes_in = ( ('.*:https?://(?Psubdomain.*)\.domain\.ru:.*/?', '/myapp/company/ index/\gsubdomain'), ('.*:https?://(?Psubdomain.*)\.domain\.ru:.*/myapp/(? Pcontroller.*)/(?Pfunction.*)/?(?Panything.*)', '/myapp/

[web2py] Re: subdomain routing

2011-04-10 Thread LightOfMooN
OK, I rewrote it with $, and it seems work fine. But there are one problem all links must not end with / for example: demo.uk-online.ru/company/info - works fine, but http://demo.uk-online.ru/company/info/ - rises invalid request Have somebody any ideas how to fix it? This is my

[web2py] subdomain auth

2011-04-10 Thread LightOfMooN
Hello. I have site based on subdomains, but all of them are the one project. for example: city1.cities.ru city2.cities.ru city3.cities.ru if I login in one subdomain, I should login else in all of others. How to fix it? I just want one login for all cities.ru subdomains thx

[web2py] Re: subdomain auth

2011-04-10 Thread LightOfMooN
No solutions for that? On 10 апр, 23:18, LightOfMooN vladsale...@yandex.ru wrote: Hello. I have site based on subdomains, but all of them are the one project. for example: city1.cities.ru city2.cities.ru city3.cities.ru if I login in one subdomain, I should login else in all of others

[web2py] Re: Help rate this logo I designed.

2011-04-10 Thread LightOfMooN
I think the shadow is too vague On 11 апр, 02:34, Pystar aitoehi...@gmail.com wrote: Thanks @Jason I am certainly not a spam bot, you can check my profile and the my posts and contributions to this group. Pascal (Pystar) Aito Lagos,Nigeria West Africa On Apr 10, 7:30 pm, Jason Brower

[web2py] Re: little question about pack all

2011-04-02 Thread LightOfMooN
it to another machine.  There is a description of it in the online book: http://web2py.com/book/default/chapter/06#CSV-%28all-tables-at-once%29 -- Joe B. On Apr 1, 9:57 am, LightOfMooN vladsale...@yandex.ru wrote: I created some app. Then packed it with pack all to install on VPS

[web2py] little question about pack all

2011-04-01 Thread LightOfMooN
I created some app. Then packed it with pack all to install on VPS for deploy. When I install it, I have seen, that it didn't make postgres database structure, because of files in myapplication/database. Also all upload folder was packed. So, the question is: for what purpose pack all pack in w2p

[web2py] Re: clean database

2011-03-31 Thread LightOfMooN
No, I'm using postgres On 1 апр, 02:08, Johann Spies johann.sp...@gmail.com wrote: On 29 March 2011 15:13, LightOfMooN vladsale...@yandex.ru wrote: Yes, thanks, it's good. But first question stills opened: Is there a way to pack just app code? (to *.w2p) I think if you use sqlite

[web2py] get by date interval

2011-03-30 Thread LightOfMooN
start_date = datetime(year=show_year, month=show_month, day=1, hour=0, minute=0, second=0) if show_month == 12: end_date = datetime(year=show_year+1, month=1, day=1, hour=0, minute=0, second=0) else: end_date = datetime(year=show_year, month=show_month+1, day=1, hour=0,

[web2py] Re: get by date interval

2011-03-30 Thread LightOfMooN
I use this query on big massive of records. I don't know what .month() and .year() does. Are they the functions, which works on python level, or are they just a functions, which form some query for database? (I use postgres) So, if .month() and .year() executes on each record, I think, it's too

[web2py] Re: clean database

2011-03-29 Thread LightOfMooN
Question is opened. App working, HDD space decreases because of uploads. But some uploads are deleted from database, but files not. How to clean it? On 27 мар, 20:25, LightOfMooN vladsale...@yandex.ru wrote: Is there a way to pack just app code? (without images and other uploads) Or it can

[web2py] Re: clean database

2011-03-29 Thread LightOfMooN
file should be deleted when the record referencing the file is deleted. For upload fields only. 2011/3/29 LightOfMooN vladsale...@yandex.ru Question is opened. App working, HDD space decreases because of uploads. But some uploads are deleted from database, but files not. How to clean

[web2py] Re: Lacking nginx deployment guide

2011-03-27 Thread LightOfMooN
...@gmail.com wrote: Make sure uwsgi has the correct path.  Look at /etc/init.d/uswgi There's a path to uwsgi.  The latest uwsgi sets the path to /usr/bin/ uwgsi but it might have been installed in /usr/local/bin/uwsgi On Mar 26, 5:04 pm, LightOfMooN vladsale...@yandex.ru wrote: Hi I

[web2py] Re: Lacking nginx deployment guide

2011-03-27 Thread LightOfMooN
trying that tonight; but fastcgi has be running very stable for the past few months. I apologize for the lack of detailed instructions (I am not in front of the configs) but if you have any questions I can look into it further and try to help. Thanks. On 3/26/11 6:04 PM, LightOfMooN wrote

[web2py] Re: Lacking nginx deployment guide

2011-03-27 Thread LightOfMooN
Huh, it runs :) Thanks a lot! I think, this + 443 port should be on web2py slices Thanks again On 27 мар, 13:24, pbreit pbreitenb...@gmail.com wrote: OK, here's another try. This is just a shell script which I have verified works on a clean Ubuntu 10.04 install. This script needs no additional

[web2py] Re: Lacking nginx deployment guide

2011-03-27 Thread LightOfMooN
, LightOfMooN vladsale...@yandex.ru wrote: Huh, it runs :) Thanks a lot! I think, this + 443 port should be on web2py slices Thanks again On 27 мар, 13:24, pbreit pbreitenb...@gmail.com wrote: OK, here's another try. This is just a shell script which I have verified works on a clean

[web2py] Re: Lacking nginx deployment guide

2011-03-27 Thread LightOfMooN
Sorry, it's my bad. Just compiled without http_ssl_module, because I missed newline when pasted script On 27 мар, 14:18, LightOfMooN vladsale...@yandex.ru wrote: Can't configure SSL. pbreit, can you help? I used this to create certificate: cd /opt/nginx/conf; openssl genrsa -out server.key

[web2py] Re: Lacking nginx deployment guide

2011-03-27 Thread LightOfMooN
also need add into nginx.conf something like this: sendfileon; client_max_body_size 100M; to avoid 413 Request Entity Too Large when upload big files

[web2py] Re: Cherokee server locking while upload

2011-03-27 Thread LightOfMooN
Yes, just tested it. Many parallel downloads, nice speed, and no locks even more. Nginx Rocks! On 27 мар, 15:41, Roberto De Ioris robe...@unbit.it wrote: Thx, but what is the best solution for now to deploy web2py with more than 3k users online, which can upload and download files? No using

[web2py] clean database

2011-03-27 Thread LightOfMooN
Is there a way to pack just app code? (without images and other uploads) Or it can be done only by manual delete upload content?

[web2py] Re: Cherokee server locking while upload

2011-03-27 Thread LightOfMooN
with copy and paste it, because google break links and newlines On 27 мар, 21:16, Jose jjac...@gmail.com wrote: On 27 mar, 06:54, LightOfMooN vladsale...@yandex.ru wrote: Yes, just tested it. Many parallel downloads, nice speed, and no locks even more. Nginx Rocks! Hello LightOfMooN, please

[web2py] Re: Setup Script: Ubuntu + Nginx + uWSGI

2011-03-27 Thread LightOfMooN
It needs something like client_max_body_size 100M; in nginx.conf to avoid error: 413 Request Entity Too Large (for example, try to install app with 6mb or upload big file) On 28 мар, 01:53, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Let me know when you think this is a ready for

[web2py] Cherokee server locking while upload

2011-03-26 Thread LightOfMooN
I have web2py + uWSGI + Cherokee When I upload file, server is locking for all users. Does somebody khow how to fix it?

[web2py] Re: Cherokee server locking while upload

2011-03-26 Thread LightOfMooN
Thx, processes4/processes helps. But so if 4 users go to page with image, or upload some file, all will be crashed again. Is it a good to have processes1000/processes? Sounds bad

  1   2   >