[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) - http

[web2py] Re: Cross domain auth

2015-12-28 Thread LightOfMooN
писал: > > On 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', 

[web2py] Re: Cross domain auth

2015-12-27 Thread LightOfMooN
28 декабря 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] 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 wil

[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.id>0)._select(..., orderby=db.things.up_

[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 ca

[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 >

[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

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
o your server to everybody. Make 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: >>

[web2py] Re: Newer version worse and worse

2013-10-11 Thread LightOfMooN
gt; On Friday, 11 October 2013 17:52:12 UTC-5, LightOfMooN wrote: >> >> 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 >> написал: >>> >&

[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 -- Re

Re: [web2py] Newer version worse and worse

2013-10-11 Thread LightOfMooN
lose tags. суббота, 12 октября 2013 г., 3:40:27 UTC+6 пользователь Roberto Perdomo написал: > > > El oct 11, 2013 8:25 AM, "LightOfMooN" > > escribió: > > > > It's really headache for me with new 2.7.2 version of web2py. > > > > There are no m

[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 a

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
013 г., 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 No

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
rsion, it's 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 a

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
so 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)

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
sugar написал: > > What do you mean 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,

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
gt; > On Friday, October 11, 2013 2:34:35 PM 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написал: >>> >>> >

[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 from admin/views/default/edit.html) Stupid needs to be removed too. It doesn't impro

[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

[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 f

[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', '/$a

[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_

[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 r

[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

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 Thur

[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'

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

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

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

2012-10-03 Thread LightOfMooN
ream(open(filename,'rb')) else: return 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 '

[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 = os.path.join(request.folder,'upl

[web2py] Re: web2py performance

2012-02-07 Thread LightOfMooN
problem solved by using rows = db.executesql(db(db.mytable.id>0)._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 wrote: > Hi > Just d

[web2py] Re: web2py performance

2012-02-06 Thread LightOfMooN
re 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" 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 = db(db.mytable.id>0

[web2py] Re: random and limitby in joins

2011-11-16 Thread LightOfMooN
derby='',limitby=(0,3)) > > On Nov 16, 2:27 am, LightOfMooN wrote: > > > > > > > > > For example, I have this database structure: > > > db.define_table('sections', > >     Field('title', 'string') > >

[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] 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 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 wrote: > What happens if you remove vars=request.vars from LOAD()? > > On Jul 9, 11:52 am, LightOfMooN wrote: > > > > > > > > > ajax=True doesn't work too > > > I make it clear: > > layout.htm

[web2py] Re: login problem

2011-07-09 Thread LightOfMooN
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 tag. > > Anthony > > > > > > > > On Saturday, July 9,

[web2py] Re: login problem

2011-07-09 Thread LightOfMooN
t the form 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. >

[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: {{if not auth.user:}} Login Password remember me {{=form.hidden_fields()}}

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

2011-07-04 Thread LightOfMooN
Thank you! Now it works fine. On 5 июл, 03:53, Anthony 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 > > to the LOA

[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 wrote: > No more copy error, but also no vars of current request passing to > LOAD(ajax=False) =\ > > On 4 июл,

[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 wrote: > I just made some changes in trunk. Can you give it a try? > > On Jul 4, 3:45 am, LightOfMooN wrote: > > > > > > > > > +1 to th

[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 doesn't

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

2011-07-03 Thread LightOfMooN
say please how to do it, thx On 4 июл, 00:01, pbreit 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-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, pbre

[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 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 desire to for JavaS

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

2011-07-02 Thread LightOfMooN
ntages do you expect? > > On Jul 2, 1:28 am, LightOfMooN 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 sit

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

2011-07-02 Thread LightOfMooN
ain to me why you prefer ajax=False to ajax=True? What > advantages do you expect? > > On Jul 2, 1:28 am, LightOfMooN wrote: > > > > > > > > > ajax=False is very important for me, so, I like 1.96 more than 1.97 :) > > I use it at most interactive compon

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

2011-07-01 Thread LightOfMooN
return dict(active_voting=active_voting, answers=answers) On 2 июл, 04:51, Massimo Di Pierro wrote: > There are logic problems with ajax=False. Just use ajax=True. I am not > sure ajax=False should be an option al all. > > On Jul 1, 11:45 am, LightOfMooN wrote: > > > >

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

2011-07-01 Thread LightOfMooN
gt; > > > > > > > On Friday, July 1, 2011 10:57:13 AM UTC-4, LightOfMooN wrote: > > so, request has no vars storage > > > On 1 июл, 20:53, LightOfMooN wrote: > > > def voting_viewlet(): > > >     return dict() > > > > works fine >

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

2011-07-01 Thread LightOfMooN
so, request has no vars storage On 1 июл, 20:53, LightOfMooN 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 d

[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 wrote: > Hello, just updated web2py to 1.97.1 and one of my si

[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 wrote: > Any ideas on this one? Has anyone else had problems with LOAD(ajax=False) in > trunk? I tried switching it to de

[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.id>0).select(db.things.ALL, db.photos.AL

[web2py] Re: request.is_local

2011-06-07 Thread LightOfMooN
you could test for that: > > > def some_block(): > >     if request.env.http_web2py_component_location: > >         do_smth() > >         return dict(smth=smth) > >     else: > >         return None > > Anthony > > > On Tuesday, June 7, 2011 1:32:43 A

[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 wrote: > Does it work if ajxa=True? What are the [0][0] for?

[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', 'som

[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] 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] 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: routes_out protocol

2011-05-04 Thread LightOfMooN
egister > > On Apr 12, 4:43 am, LightOfMooN 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, bec

[web2py] Re: cyrillic in routes

2011-04-18 Thread LightOfMooN
ry start rocket without web2py > > python 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 wrote: > > > > > > > > > Web2py is on Ub

[web2py] Re: cyrillic in routes

2011-04-17 Thread LightOfMooN
it rises invalid request. So, it seems, that web2py can't work with cyrillic symbols in url for now :( On 17 апр, 21:58, Massimo Di Pierro wrote: > what is the encoding? What is the os? > > I do not think a domain may contain chars that are not expressible in > utf8 b

[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 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:.

[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 understand,

[web2py] Re: cyrillic in routes

2011-04-17 Thread LightOfMooN
Thank you :) On 17 апр, 21:18, Massimo Di Pierro wrote: > Try: > > >>> u'/привет'.encode('utf8') > > '/\xd0\xbf\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82' > > routes_in = ( > ('/\xd0\xbf\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82&#x

[web2py] Re: cyrillic in routes

2011-04-17 Thread LightOfMooN
You have to use utf8 for now. > > On Apr 17, 9:45 am, LightOfMooN 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] 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: 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 wrote: > On Monday, April 11, 2011 2:05:34 PM UTC-4, LightOfMooN wrote: > > > No, it just a single applicat

[web2py] Re: routes_out protocol

2011-04-11 Thread LightOfMooN
tocol*://$sub.domain.ru'), On 11 апр, 23:45, Jonathan Lundell 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&

[web2py] Re: subdomain auth

2011-04-11 Thread LightOfMooN
le application, 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! > > > O

[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 r

[web2py] Re: subdomain auth

2011-04-11 Thread LightOfMooN
d_name]['domain'] = ".habrahabr.ru" > > > I think that's supposed to send the cookie to all subdomains (not sure about > > other implications for sessions and security). You might also need some > > logic so the domain is not set when running on localhost. >

[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 wrote: > are you saving the cookies in cities.ru domain but not per subdomain? > > On Apr 11, 6:40 pm, LightOfMooN wrote: > > > > > > > > > But that is in all bro

[web2py] Re: subdomain auth

2011-04-11 Thread LightOfMooN
://devart.habrahabr.ru/ So, is there a way in web2py to log in all subdomains? On 11 апр, 19:39, Massimo Di Pierro wrote: > The problem I can thnk of is that browser perceives them as different > domains and does not share cookies required for session info. > > On Apr 11, 12:35 am, LightO

[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 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 wrote: > > > > >

[web2py] Re: subdomain auth

2011-04-10 Thread LightOfMooN
No solutions for that? On 10 апр, 23:18, LightOfMooN 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 els

[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 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 routes.

[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?://(?P.*)\.domain\.ru:.*/?', '/myapp/company/ index/\g'), ('.*:https?://(?P.*)\.domain\.ru:.*/myapp/(? P.*)/(?P.*)/?(?P.*)', '/myapp/ \g/\g/\g/\g'), ('/$c/$f', '/managecom/$c/$f'), ) routes_out = (

[web2py] Re: little question about "pack all"

2011-04-01 Thread LightOfMooN
t; CSV file and import 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 wrote: > > > > > > > > > I created

[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

[web2py] Re: clean database

2011-03-31 Thread LightOfMooN
No, I'm using postgres On 1 апр, 02:08, Johann Spies wrote: > On 29 March 2011 15:13, LightOfMooN 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

[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 slo

[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, minu

[web2py] Re: clean database

2011-03-29 Thread LightOfMooN
oaded file should be deleted > when the record referencing the file is deleted. For "upload" fields only. > > 2011/3/29 LightOfMooN > > > Question is opened. > > App working, HDD space decreases because of uploads. But some uploads > > are deleted from database

[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 wrote: > Is there a way to pack just app code? > (without images and other uploads) > Or it can be don

[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 wrote: > Let me know when you think this is a ready for inclusion. I agree with > Antho

[web2py] Re: Cherokee server locking while upload

2011-03-27 Thread LightOfMooN
ostgresql sudo apt-get -y install python-psycopg2 === take care with copy and paste it, because google break links and newlines On 27 мар, 21:16, Jose wrote: > On 27 mar, 06:54, LightOfMooN wrote: > > > Yes, just tested it. > > Many parallel downloads, nice speed,

[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
Yes, just tested it. Many parallel downloads, nice speed, and no locks even more. Nginx Rocks! On 27 мар, 15:41, "Roberto De Ioris" 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 a stream

[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: 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 wrote: > Can't configure SSL. > pbreit, can you help? > > I used this to create certificate: > > cd /opt/nginx/conf; openssl genrsa -o

[web2py] Re: Lacking nginx deployment guide

2011-03-27 Thread LightOfMooN
;ssl" On 27 мар, 13:50, LightOfMooN wrote: > Huh, it runs :) > Thanks a lot! > I think, this + 443 port should be on web2py slices > Thanks again > > On 27 мар, 13:24, pbreit wrote: > > > > > > > > > OK, here's another try. This is just a s

[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 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 > editing. To get it

[web2py] Re: Lacking nginx deployment guide

2011-03-27 Thread LightOfMooN
nt 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: > > > > > > > > > Hi > > I follow this > > guidehttp://stackoverflow.com/questions/5335153/how-to-deply-web2py-using-... > > I have ubuntu 10.4 + nginx + web2py, installed in var > > > And the result is 502 Bad Gateway. > > Any suggestions?

[web2py] Re: Lacking nginx deployment guide

2011-03-27 Thread LightOfMooN
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 wrote: > > >

[web2py] Re: Cherokee server locking while upload

2011-03-26 Thread LightOfMooN
Thx, but what is the best solution for now to deploy web2py with more than 3k users online, which can upload and download files? On 27 мар, 11:46, "Roberto De Ioris" wrote: > > Thx, 4 helps. > > But so if 4 users go to page with image, or upload some file, all will > > be crashed again. > > Is it

  1   2   >