[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] Radio widget and validation SQLFORM

2011-11-16 Thread paul
Hi, I am having issues with an SQLFORM with list:string and having requires=IS_IN_SET on the field. By default this works when using the select drop down I am able to overwrite the validation (by detecting a particular post key e.g. draft) and use IS_EMPTY_OR on the

[web2py] Re: format=

2011-11-16 Thread annet
Jim and Richard, Thanks for your replies, problem solved. Kind regards, Annet.

Re: [web2py] Re: [ login | register | lost password? ]

2011-11-16 Thread Anthony
On Wednesday, November 16, 2011 12:50:18 AM UTC-5, Viren Patel wrote: Hi, We can directly find and change in tools.py Still not clear in which file to put the code for SPAN helper object so that we do not need to modify tools.py Assuming auth.navbar() is included in your layout.html so it

[web2py] Re: SQLFORM.smartgrid - custom add form

2011-11-16 Thread Cliff
Jim, I've been curious about this myself. Here is what I discovered. Tested on 1.99.2. Should be adaptable to a custom form. Obviously one would want something more sophisticated than a string for the key value in a real app. from controllers/dogs.py, for grid: def index(): grid =

[web2py] Re: [ login | register | lost password? ]

2011-11-16 Thread Anthony
On Tuesday, November 15, 2011 10:59:27 PM UTC-5, Ray (a.k.a. Iceberg) wrote: Hi Anthony, So you are quite familiar with the web2py internal, this time the navbar. Are you the programmer of that function? Would you comment on this issue?

[web2py] text field remove default when user inputs data

2011-11-16 Thread thodoris
Hello, I have a text field in my db with a default instructive text like Enter your comment here, but i would like when the user tries to input text, the default text to disappear without having to delete it manually

[web2py] Re: text field remove default when user inputs data

2011-11-16 Thread Anthony
You can use a comment instead of a default: Fields(..., comment='Enter your comment here') though that will display next to or below the input field (depending on your formstyle) rather than in the text box itself. As an alternative, you can set the HTML5 'placeholder' attribute for the

[web2py] Re: text field remove default when user inputs data

2011-11-16 Thread thodoris
Thnx a lot! On Nov 16, 10:42 am, Anthony abasta...@gmail.com wrote: You can use a comment instead of a default:     Fields(..., comment='Enter your comment here') though that will display next to or below the input field (depending on your formstyle) rather than in the text box itself. As

[web2py] Checkboxes in SQLFORMs don't show updated values in 1.99.2

2011-11-16 Thread pgergo
Hi! We recently upgraded from 1.98.2 to 1.99.2, and seem to find a regression. An SQLFORM renders boolean database fields as checkboxes. If you (un)check a box and hit submit, calling myform.accepts() and redisplaying the form used to render the fields with the new, updated values. Since the

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-16 Thread Rahul
Hi All, I still get a ticket if I use fields code as mentioned by Johann (I am using latest stable - web2py 1.99.2 not trunk) , does it work with the trunk version? Result1: fields = (db.projects_post.title, db.projects_posts.project_details,

Re: [web2py] Re: routers only exposing default controller

2011-11-16 Thread Richard Baron Penman
I found listing the controllers explicitly as Bruno mentioned fixed the problem. Previously domain/non-default-controller returned: invalid function (default/non-default-controller) I would expect all controllers to work by default. Richard On Wed, Nov 16, 2011 at 2:36 PM, Jonathan Lundell

Re: [web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-16 Thread Johann Spies
On 16 November 2011 14:24, Rahul rahul.dhak...@gmail.com wrote: Hi All, I still get a ticket if I use fields code as mentioned by Johann (I am using latest stable - web2py 1.99.2 not trunk) , does it work with the trunk version? Result1: fields = (db.projects_post.title,

[web2py] Strange behavior using a function to update a record

2011-11-16 Thread Tito Garrido
Hi Folks! I've created some functions on my model because I need to use them often but seems that I can't update a record using it, example of code: sandbox/models/db.py db.define_table('mytable', Field('myfield','string'), Field('state','integer') )

Re: [web2py] Strange behavior using a function to update a record

2011-11-16 Thread Johann Spies
On 16 November 2011 15:57, Tito Garrido titogarr...@gmail.com wrote: sandbox/models/db.py db.define_table('mytable', Field('myfield','string'), Field('state','integer') ) sandbox/models/db_functions.pydef test(id): r=db.mytable[id] r.update(state=55) Try: def

Re: [web2py] Strange behavior using a function to update a record

2011-11-16 Thread Johann Spies
On 16 November 2011 16:07, Johann Spies johann.sp...@gmail.com wrote: On 16 November 2011 15:57, Tito Garrido titogarr...@gmail.com wrote: sandbox/models/db.py db.define_table('mytable', Field('myfield','string'), Field('state','integer') ) sandbox/models/db_functions.pydef

[web2py] Re: Strange behavior using a function to update a record

2011-11-16 Thread Anthony
On Wednesday, November 16, 2011 8:57:10 AM UTC-5, Tito Garrido wrote: sandbox/models/db_functions.py def test(id): r=db.mytable[id] r.update(state=55) In the above, 'r' is a Row object, so all you are doing is updating the Row object itself, not the original record in the db. To

[web2py] Re: Improvement for Crud.update()

2011-11-16 Thread Massimo Di Pierro
in trunk! On Nov 13, 8:24 am, Ray (a.k.a. Iceberg) iceb...@21cn.com wrote: Hi Massimo, Following code snippet comes from gluon/tools.py 's line 3029~3030.         elif not request.extension in ('html','load'):             raise HTTP(401) I suggest to change it into:         elif not

[web2py] Re: random and limitby in joins

2011-11-16 Thread Massimo Di Pierro
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'),    

Re: [web2py] Re: routers only exposing default controller

2011-11-16 Thread Bruno Rocha
On Wed, Nov 16, 2011 at 11:32 AM, Richard Baron Penman richar...@gmail.comwrote: I found listing the controllers explicitly as Bruno mentioned fixed the problem. Previously domain/non-default-controller returned: invalid function (default/non-default-controller) I would expect all

[web2py] Re: Checkboxes in SQLFORMs don't show updated values in 1.99.2

2011-11-16 Thread Massimo Di Pierro
please open ticket about this and I will deal with it asap.

[web2py] Re: Detecting if a session has ended

2011-11-16 Thread Massimo Di Pierro
Inside Auth(...) there is this logic if auth and auth.last_visit and auth.last_visit + \ datetime.timedelta(days=0, seconds=auth.expiration) request.now: self.user = auth.user # this is a trick to speed up sessions if (request.now -

Re: [web2py] Re: Detecting if a session has ended

2011-11-16 Thread Richard Vézina
Ok, so what I want is to know how to verify if it authentification has expired... I hope I am clear I don't know the exact wording for what I want... But I would trigger a update on my flag (logged_on : TRUE/FALSE) in case user don't clic disconnect before close browser or if he leave his

Re: [web2py] routers only exposing default controller

2011-11-16 Thread Jonathan Lundell
On Nov 16, 2011, at 5:32 AM, Richard Baron Penman wrote: I found listing the controllers explicitly as Bruno mentioned fixed the problem. Previously domain/non-default-controller returned: invalid function (default/non-default-controller) I would expect all controllers to work by default.

[web2py] Re: Checkboxes in SQLFORMs don't show updated values in 1.99.2

2011-11-16 Thread pgergo
On Nov 16, 3:34 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: please open ticket about this and I will deal with it asap. Ah, so there _is_ an issue tracker... I found one on Google Code, but there's no link to it from web2py.com, only to Google Groups. I'm opening a ticket there in a

[web2py] codemirror as editor

2011-11-16 Thread elffikk
hi, I just managed to use codemirror instead of editarea using python mode and html mixed mode for views and codemirror-ui toolbar I propose to include it in web2py as an alternative to eamy and editarea, may be as a default one I can send the code and files that I used

[web2py] Re: random and limitby in joins

2011-11-16 Thread LightOfMooN
By this way we get just 3 records at all. But I need to get ALL sections, and by 3 thread per section. So, I need a query to make this structure: section1 thread1 thread4 section2 thread5 section3 thread7 thread8 thread9 It can be done by many queries like: sections =

[web2py] Re: codemirror as editor

2011-11-16 Thread Anthony
Sounds good if it works in all browsers. Editarea doesn't work in IE9 (and has some display problems even in IE7-8), and Amy doesn't work in IE9. On Wednesday, November 16, 2011 11:33:09 AM UTC-5, elffikk wrote: hi, I just managed to use codemirror instead of editarea using python mode

[web2py] Re: Help for creating template

2011-11-16 Thread miroslavgojic
Hi, Thanks for this replay, showed example with if logic is very interesting, Regards Miroslav On Nov 15, 11:59 am, Khalil KHAMLICHI khamlichi.kha...@gmail.com wrote: Hi, you can as well put you logic in the menu.py file like this : if auth.user:     if auth.user.id 10 and

Re: [web2py] Re: Detecting if a session has ended

2011-11-16 Thread Richard Vézina
Ok so I just need look into : auth.is_logged_in()=False So what about this : def user_logged_on_update(flag, user_id): Update of logged_on auth_user field. True = logged on. if user_id != None and flag != None: db.auth_user[user_id] = dict(logged_on = flag) return

[web2py] Re: random and limitby in joins

2011-11-16 Thread Massimo Di Pierro
I do not think so. On Nov 16, 10:37 am, LightOfMooN vladsale...@yandex.ru wrote: By this way we get just 3 records at all. But I need to get ALL sections, and by 3 thread per section. So, I need a query to make this structure: section1     thread1     thread4 section2     thread5

[web2py] Re: Detecting if a session has ended

2011-11-16 Thread Massimo Di Pierro
Now I understand what you want to do. What you propose would not work because there is no logout event. Unless the user clicks the logout button, the logout happens when the user tries to access the site and the session time exceeds expiration. If the user logins and turns the browser off, the

[web2py] Re: SQLFORM.grid ondelete possible bug

2011-11-16 Thread Casey Schroeder
There may be an update on this that i missed, but can I ask if this fix is sufficient? I believe that the ret parameter is the effected row count, correct? If you just deleted the record, can you reliably retrieve it from the table and record id in ondelete, i.e. before a subsequent commit? My

Re: [web2py] Re: Strange behavior using a function to update a record

2011-11-16 Thread Tito Garrido
Good Catch both of you! :-) update_record works! Thanks! On Wed, Nov 16, 2011 at 12:12 PM, Anthony abasta...@gmail.com wrote: On Wednesday, November 16, 2011 8:57:10 AM UTC-5, Tito Garrido wrote: sandbox/models/db_functions.**py def test(id): r=db.mytable[id] r.update(state=55)

Re: [web2py] Re: Detecting if a session has ended

2011-11-16 Thread Richard Vézina
Ok... I was trying to avoid this mostly cause I have no time to look into it comet... And also because it's something I don't master at this time. Is it straight foward to put on? Thank you for your help. Richard On Wed, Nov 16, 2011 at 1:51 PM, Massimo Di Pierro massimo.dipie...@gmail.com

[web2py] StringIO.StringIO + csv.writer puts a bunch of empty lines at the start of generated CSV

2011-11-16 Thread Nate Atkinson
Hi, I'm trying to create a CSV view for a set of rows. Here's the code for the view: {{import StringIO, csv}} {{outfile = StringIO.StringIO()}} {{mywriter = csv.writer(outfile, dialect=csv.excel_tab)}} {{mywriter.writerow(['Name', 'Address', 'City', 'State'])}} {{for row in places:}} {{mydata =

Re: [web2py] Re: Detecting if a session has ended

2011-11-16 Thread Richard Vézina
There is way what I did works at least imperfectly ? I want to make a quick gain for a couples of weeks... After then I will have more time to look into comet_messaging.. Richard On Wed, Nov 16, 2011 at 1:51 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Now I understand what you

[web2py] Easy handling of subforms

2011-11-16 Thread ~redShadow~
For some reason, I need to simultaneously update a bunch of records together in the same form. Specifically, records come from different tables but field names sometimes overlaps, this not allowing to simply merge the standard CRUD SQLFORMs. I like a feature in the Drupal Forms API that's

Re: [web2py] Easy handling of subforms

2011-11-16 Thread Richard Vézina
Man! I think you got a nice solution for this exact problem... I had tried with jQuery in the pass to manage this by duplicating the field that I want to bunch insert for... It was working but was breaking the workflow of form validation if I remember... Web2py has change a lot since then and I

[web2py] packaging return from executesql as Rows object?

2011-11-16 Thread David Watson
Does anybody have example code showing how to package the return from executesql as a gluon.sql.Rows object? I have tried: raw_rows = legacy_db.executesql(sqlstr, as_dict=True) from gluon import sql columns = ['col1', 'col2', 'col3'] rowsobj = sql.Rows(legacy_db, raw_rows,

[web2py] Autocomplete Widget changed after upgrade

2011-11-16 Thread Ole Martin Maeland
Hi, I upgraded web2py to latest version. everything works fine exept the autocomplete widget I use MySQL as my database. The autocomplete is reading from a db VIEW. The reason for this is that I have 2 columns in a db: short_name and ISIN that is the name, and ISIN that is the ID. By doing

[web2py] datetime handling in web2py

2011-11-16 Thread nick name
I keep getting burned by how web2py handles datetimes; specifically, my project requires millisecond precision of timestamps. The two databases I care about support it, pgsql has microsecond resolution and sqlite is agnostic (pysqlite3 specifically supports microseconds). MySQL and Oracle,

[web2py] Re: StringIO.StringIO + csv.writer puts a bunch of empty lines at the start of generated CSV

2011-11-16 Thread Anthony
Actually, the number of blank lines is exactly 6 + (3 x number of rows). In web2py templates, every {{...}} that doesn't write anything to the view still generates a blank line in the output. Your code (up to and including the response.write line) includes 6 blocks of {{...}} that are called

[web2py] Re: Webfaction: Memory usage way over your limit ; again.

2011-11-16 Thread elffikk
hi Roberto, a few questions about uwsgi 1: - how it is running by default: threaded or async? - does it limits memory usage or I have to use as before --limit-as 80 ? I suppose that I have to pass parameter as it doesn't know the memory limit please tell me what you think about my command

[web2py] Re: StringIO.StringIO + csv.writer puts a bunch of empty lines at the start of generated CSV

2011-11-16 Thread Nate Atkinson
Aha! Thank you so much. My first time writing a non-HTML view-- didn't realize the braces generated a blank line, or that I could include multiple lines within braces. You've solved the problem, and made my code look nicer too! Thanks Nate On Nov 16, 4:34 pm, Anthony abasta...@gmail.com wrote:

[web2py] Re: StringIO.StringIO + csv.writer puts a bunch of empty lines at the start of generated CSV

2011-11-16 Thread Anthony
The CSV example in the book does it this way (http://web2py.com/book/default/chapter/09#CSV), but it doesn't explicitly mention the gotcha. On Wednesday, November 16, 2011 4:57:04 PM UTC-5, Nate Atkinson wrote: Aha! Thank you so much. My first time writing a non-HTML view-- didn't realize

[web2py] Re: SQLFORM.grid: show reference table

2011-11-16 Thread Omi Chiba
I found we can just JOIN the table and specify the fields you want to display. It's nice if grid does it automatically but this is easy enough. def admin(): db.Product.id.readable = False query = db.Product.Model_ID == db.Model.id products =

[web2py] Re: Checkboxes in SQLFORMs don't show updated values in 1.99.2

2011-11-16 Thread Omi Chiba
Thank you to bring this up. I was actually going to report the same issue. I have a check box in a form. After I checked and click submit, it will be unchecked(Reset) if there is validation error on the form. On Nov 16, 10:23 am, pgergo pge...@deverto.com wrote: On Nov 16, 3:34 pm, Massimo Di

[web2py] Re: packaging return from executesql as Rows object?

2011-11-16 Thread dlypka
Why send legacy_db into sql.Rows()? It is not needed for anything at that point. Maybe just send in None or some default as the first arg. On Nov 16, 2:43 pm, David Watson davidthewat...@gmail.com wrote: Does anybody have example code showing how to package the return from executesql as a

Re: [web2py] Re: StringIO.StringIO + csv.writer puts a bunch of empty lines at the start of generated CSV

2011-11-16 Thread Khalil KHAMLICHI
Hi, one dirty way of getting the same result = to open the rows in excel : would be to 1/ generate a normal html table 2/ end the filename with .xls as extension that would make usage of excel's ability to read xhtml data without going thru StringIO khalil

[web2py] Re: packaging return from executesql as Rows object?

2011-11-16 Thread Anthony
If you're just looking to use SQLTABLE, you should be able to just send the results of executesql directly to SQLTABLE...I think. Anthony On Wednesday, November 16, 2011 3:43:56 PM UTC-5, David Watson wrote: Does anybody have example code showing how to package the return from executesql as

Re: [web2py] Re: packaging return from executesql as Rows object?

2011-11-16 Thread Khalil KHAMLICHI
Hi, I believe all you want is execute some of your own sql code inside web2py. If I am right , all you need to have to do is run your query and catch return value into 'results' 1/ results=db.executesql(your-sql-query-goes-here) to send it to the view 2/ return dict(results=results) once

[web2py] Re: packaging return from executesql as Rows object?

2011-11-16 Thread Anthony
On Wednesday, November 16, 2011 5:56:01 PM UTC-5, Anthony wrote: If you're just looking to use SQLTABLE, you should be able to just send the results of executesql directly to SQLTABLE...I think. Oops, sorry, that's wrong. On the other hand, you can do db.executesql(..., as_dict=True) and

Re: [web2py] Re: packaging return from executesql as Rows object?

2011-11-16 Thread Bruno Rocha
from gluon.storage import Storage from gluon.dal import Rows result = db.executesql(SELECT first_name, last_name FROM auth_user, as_dict=True) result = [Storage(item) for item in result] newrows = Rows(records=result) newrows[0].first_name u'Bruno'

Re: [web2py] Re: packaging return from executesql as Rows object?

2011-11-16 Thread Bruno Rocha
wait, there is a better way. from gluon.dal import Rows, Row result = access.db.executesql(SELECT first_name, last_name FROM auth_user, as_dict=True) rows = Rows(records=[Row(item) for item in result]) rows[0].first_name u'Bruno' You can set other values for each Row.

[web2py] Computed Fields broken by 1.99.2

2011-11-16 Thread David Manns
One of the recent releases has broken computed fields. My application uses several instances of computed fields. They all worked perfectly in 1.94.6 to which I have now reverted. In 1.99.2 (and possibly intervening releases) the behavior of computed fields is unpredictable. In my case, they

Re: [web2py] Computed Fields broken by 1.99.2

2011-11-16 Thread Bruno Rocha
Please, can you share some parts of your models? Specially an example of a computed field declaration and what are you using in compute=?, also it is important to have an example of what types the the other fields. It is important to reproduce the problem for fixing (if a bug) also, can you

[web2py] Re: Computed Fields broken by 1.99.2

2011-11-16 Thread Anthony
On Wednesday, November 16, 2011 8:39:54 PM UTC-5, David Manns wrote: This is all very alarming in a framework which boasts of always maintaining backward compatibility - quote taken from the preface of the book. The intention was certainly not to break backward compatibility. If something

[web2py] DAL caching values automatically?

2011-11-16 Thread John Duddy
I have a config table, and I query for values like this from a cron program: db(db.config.name=='api_key').select(db.config.value).first().value This query always returns the same value, even after I change it via the admin app's database editor. Is the DAL doing some sort of caching? Is there

[web2py] Re: Using web2py with a non-managed Oracle database

2011-11-16 Thread Ben Goosman
Hey DenesL, Could you explain how adding in definitions for 'reference FK' and 'reference TFK' helps when setting migrate=False? As far as I can tell, those two fields are only used to generate create table queries, which are not needed when one doesn't want web2py to change the database at

[web2py] Re: StringIO.StringIO + csv.writer puts a bunch of empty lines at the start of generated CSV

2011-11-16 Thread Brian M
Another way around this would be to generate the csv file in the controller instead of in the view. Set the appropriate headers and the simply return outfile.getvalue() from the controller and your browser will download the csv file generated in the controller.

Re: [web2py] DAL caching values automatically?

2011-11-16 Thread Bruno Rocha
DAL does not cache anything unless you explicit pass cache argument to select() db(db.config.name=='api_key').select(db.config.value, cache=(cache.ram, 50)).first().value Are you sure the value has changed in database? Are you assigning the returned value in to a to level class attribute? it

[web2py] Recursive select up to 2 levels

2011-11-16 Thread Cahya Dewanta
Hello. Here's how I define my models: db.define_table('owner', Field('name'), format='%(name)s') db.define_table('retail', Field('owner_id', db.owner), Field('name'), format='%(name)s') db.define_table('administer', Field('retail_id', db.retail), Field('name')) How can I select all administers

[web2py] Re: DAL caching values automatically?

2011-11-16 Thread nick name
Does your cron program run continuously? what database are you using? If you are using a database that supports mvcc (Oracle, Postgres, MySQL with InnoDB tables, possibly others), your first select (of any kind, not just this query) logically freezes the state of the database, and you will not

[web2py] Fluxflex with mercurial-git plugin

2011-11-16 Thread ma...@rockiger.com
I have a question to the mercurial users out there. Did anybody managed to upload applications to fluxflex with the mercurial-git plugin. I don't wanna use git for web2py development. Regards, Marco

[web2py] Re: Autocomplete Widget changed after upgrade

2011-11-16 Thread Massimo Di Pierro
what did you upgrade from? On Nov 16, 3:07 pm, Ole Martin Maeland olemael...@gmail.com wrote: Hi, I upgraded web2py to latest version. everything works fine exept the autocomplete widget I use MySQL as my database. The autocomplete is reading from a db VIEW. The reason for this is that I

[web2py] Re: Computed Fields broken by 1.99.2

2011-11-16 Thread Massimo Di Pierro
I believe this is a bug and it has already been fixed in trunk and nightly build. can you confirm? On Nov 16, 8:23 pm, Anthony abasta...@gmail.com wrote: On Wednesday, November 16, 2011 8:39:54 PM UTC-5, David Manns wrote: This is all very alarming in a framework which boasts of always

[web2py] Re: SQLFORM.grid ondelete possible bug

2011-11-16 Thread Massimo Di Pierro
Hello Casey, Can you show us your test? On Nov 16, 1:14 pm, Casey Schroeder vizqu...@gmail.com wrote: There may be an update on this that i missed, but can I ask if this fix is sufficient? I believe that the ret parameter is the effected row count, correct? If you just deleted the record,

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-16 Thread Rahul
Hi Johann, All, Thanks! that worked like a charm :) Thanks everyone for your immediate help, I'll put up a slice (on web2pyslices) by weekend for with the necessary things needed for making SQLForm.grid up and running with web2py. Now some more questions (for making SQLForm.grid more

[web2py] BULKLOADER IMPORT

2011-11-16 Thread Saurabh S
Hi , i used inbuilt import function provided by web2py on GAE but after import my id's in the table were changing so i opted for BULKLOADER to perform import via command line (i want id's in the datastore table to be same as they are in the file) 1. while importing a file via command line i am

Re: [web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-16 Thread Johann Spies
On 17 November 2011 08:57, Rahul rahul.dhak...@gmail.com wrote: How can I make it use existing functions (that are there by default SQLForm.grid) associated with View, Edit and Delete (CRUD)'s ? Some time ago I have asked the same question and got the following answer form simo...@gmail.com:

Re: [web2py] Re: Autocomplete Widget changed after upgrade

2011-11-16 Thread Ole Martin Maeland
Hi Massimo, upgrade from version 1.89.5 (2010-11-21), so old version. I have tried to substitute the built in autocomplete with s-cubism suggest_widget. It works the same way - no function when I try to read from db view, but works fine when directly from db. regards Martin On Thu, Nov 17,

Re: [web2py] routers only exposing default controller

2011-11-16 Thread Richard Baron Penman
what web2py version are you using? I have 1.99.2 This is the only variable I have defined in routes.py: routers = dict( BASE = dict( domains = { 'domain1' : 'forum', 'domain2' : 'sales', }, controllers = ['default', 'appadmin', 'view'], # also tried