[web2py] table auth_user already exists
Hi web2py users, Just upgraded to Version 1.97.1 I checked my code out into the new directory, opened my browser, and received and error stating 'auth_cas' already exists. I removed all files from the databases folder and tried again receiving an error that 'auth_user' already exists. I'm using a private/config file that points to some mysql database on another server. What can I do ? I'd be happy to share more information needed to help solve the problem. Thanks in advance, Chris
[web2py] Re: table auth_user already exists
I upgraded via the admin update link and received an error, so I went ahead and downloaded the source. Regarding the migration techniques, the exception is being thrown on creating web2py auth tables - specifically the following line of code : auth.define_tables() Shouldn't web2py handle this for me? Perhaps I need to include a line similar to the following? db = DAL('sqlite://storage.db', migrate=False) On Jun 27, 2:45 pm, Richard Vézina wrote: > Have you try : > > http://www.web2py.com/book/default/chapter/06?search=migrate#Fixing-B...http://www.web2py.com/book/default/chapter/06?search=migrate#Migrations > > You should use migrate=False in your models once your tables have been > created and you know you will not have to modify them... > > Richard > > On Mon, Jun 27, 2011 at 3:40 PM, Richard Vézina > > > > > > > > wrote: > > Did you upgrade by the web2py "admin" update link? > > > Richard > > > On Mon, Jun 27, 2011 at 2:22 PM, Christopher Baron > > wrote: > > >> Hi web2py users, > > >> Just upgraded to Version 1.97.1 > > >> I checked my code out into the new directory, opened my browser, and > >> received and error stating 'auth_cas' already exists. > > >> I removed all files from the databases folder and tried again > >> receiving an error that 'auth_user' already exists. > > >> I'm using a private/config file that points to some mysql database on > >> another server. > > >> What can I do ? > > >> I'd be happy to share more information needed to help solve the > >> problem. > > >> Thanks in advance, > > >> Chris
[web2py] Re: table auth_user already exists
I've tried db = DAL("mysql://%s:%s@%s/%s" % (user, password, host, dbname), migrate=False) and still have the same problem. On Jun 27, 3:07 pm, Christopher Baron wrote: > I upgraded via the admin update link and received an error, so I went > ahead and downloaded the source. > > Regarding the migration techniques, the exception is being thrown on > creating web2py auth tables - specifically the following line of > code : > > auth.define_tables() > > Shouldn't web2py handle this for me? Perhaps I need to include a line > similar to the following? > > db = DAL('sqlite://storage.db', migrate=False) > > On Jun 27, 2:45 pm, Richard Vézina > wrote: > > > > > > > > > Have you try : > > >http://www.web2py.com/book/default/chapter/06?search=migrate#Fixing-B... > > > You should use migrate=False in your models once your tables have been > > created and you know you will not have to modify them... > > > Richard > > > On Mon, Jun 27, 2011 at 3:40 PM, Richard Vézina > > > wrote: > > > Did you upgrade by the web2py "admin" update link? > > > > Richard > > > > On Mon, Jun 27, 2011 at 2:22 PM, Christopher Baron > > > wrote: > > > >> Hi web2py users, > > > >> Just upgraded to Version 1.97.1 > > > >> I checked my code out into the new directory, opened my browser, and > > >> received and error stating 'auth_cas' already exists. > > > >> I removed all files from the databases folder and tried again > > >> receiving an error that 'auth_user' already exists. > > > >> I'm using a private/config file that points to some mysql database on > > >> another server. > > > >> What can I do ? > > > >> I'd be happy to share more information needed to help solve the > > >> problem. > > > >> Thanks in advance, > > > >> Chris
[web2py] Re: table auth_user already exists
Ok, auth.define_tables( migrate=False ) seems to fix it, but what happens when a future web2py update changes the auth tables ? On Jun 27, 3:09 pm, Christopher Baron wrote: > I've tried > > db = DAL("mysql://%s:%s@%s/%s" % (user, password, host, dbname), > migrate=False) > > and still have the same problem. > > On Jun 27, 3:07 pm, Christopher Baron wrote: > > > > > > > > > I upgraded via the admin update link and received an error, so I went > > ahead and downloaded the source. > > > Regarding the migration techniques, the exception is being thrown on > > creating web2py auth tables - specifically the following line of > > code : > > > auth.define_tables() > > > Shouldn't web2py handle this for me? Perhaps I need to include a line > > similar to the following? > > > db = DAL('sqlite://storage.db', migrate=False) > > > On Jun 27, 2:45 pm, Richard Vézina > > wrote: > > > > Have you try : > > > >http://www.web2py.com/book/default/chapter/06?search=migrate#Fixing-B... > > > > You should use migrate=False in your models once your tables have been > > > created and you know you will not have to modify them... > > > > Richard > > > > On Mon, Jun 27, 2011 at 3:40 PM, Richard Vézina > > > > > > > wrote: > > > > Did you upgrade by the web2py "admin" update link? > > > > > Richard > > > > > On Mon, Jun 27, 2011 at 2:22 PM, Christopher Baron > > > > > > > > wrote: > > > > >> Hi web2py users, > > > > >> Just upgraded to Version 1.97.1 > > > > >> I checked my code out into the new directory, opened my browser, and > > > >> received and error stating 'auth_cas' already exists. > > > > >> I removed all files from the databases folder and tried again > > > >> receiving an error that 'auth_user' already exists. > > > > >> I'm using a private/config file that points to some mysql database on > > > >> another server. > > > > >> What can I do ? > > > > >> I'd be happy to share more information needed to help solve the > > > >> problem. > > > > >> Thanks in advance, > > > > >> Chris
[web2py] Re: powertable ( multiple tables on the same page )
Does anyone know where, what to set the 'aoColumns' property to ? The documentation for this plugin is not helpful... On Jul 18, 1:25 pm, Roberto Perdomo wrote: > I now discover that only show the details only for the first 10 records. > > I send you to your mail my app, because is very hevy for the group mail. > > 2011/7/18 Bruno Rocha > > > > > > > > > include ownTable._id = "something" and ownTable._class = "something" to set > > different class and id to the tables. > > > On Mon, Jul 18, 2011 at 12:57 PM, Chris Baron wrote: > > >> How do you do it ? > > >> Here is my controller : > > >> ownDataSource = db( db.gtree.contributor == ' > >> '.join( [ auth.user.first_name, auth.user.last_name ] ) ).select() > > >> class ownVirtualFields(object): > >> @virtualsettings(label='Tree') > >> def tree_url(self): > >> gtree = self.gtree.id > >> u = URL(c="gtree",f="view",args=self.gtree.id, > >> vars=dict(treeType='grafted')) > >> return A('grafted', _href=u) > > >> ownTable = plugins.powerTable > >> ownTable.datasource = ownDataSource > >> ownTable.dtfeatures["sScrollY"] = "200px" > >> ownTable.dtfeatures["sScrollX"] = "100%" > >> ownTable.virtualfields = ownVirtualFields() > >> ownTable.headers = "labels" > >> ownTable.showkeycolumn = False > >> ownTable.dtfeatures["bJQueryUI"] = > >> request.vars.get("jqueryui",True) > >> ## ownTable.uitheme = request.vars.get("theme","cupertino") > >> ownTable.uitheme = request.vars.get("theme","smoothness") > >> ownTable.dtfeatures["iDisplayLength"] = 25 > >> ownTable.dtfeatures["aaSorting"] = [[6,'desc']] > >> ownTable.dtfeatures["sPaginationType"] = request.vars.get( > >> "pager","full_numbers" > >> ) # two_button scrolling > >> ownTable.columns = ["gtree.id", > >> "virtual.tree_url", > >> "gtree.mtime", > >> "gtree.title", > >> "gtree.comment" ] > > >> ownTable.extra = dict(autoresize=True) > > >> > > >> uniqueUserId = db( db.user_map.auth_user_id == > >> auth.user.id ).select()[0].unique_user_id > > >> shareDataSource = db( ( db.gtree.id == db.gtree_share.gtree ) & > >> ( db.gtree_share.user == > >> uniqueUserId ) ).select() > > >> class shareVirtualFields(object): > >> @virtualsettings(label='Tree') > >> def tree_url(self): > >> gtree = self.gtree.id > >> u = URL(c="gtree",f="view",args=self.gtree.id, > >> vars=dict(treeType='grafted')) > >> return A('grafted', _href=u) > >> shareTable = plugins.powerTable > >> shareTable.datasource = shareDataSource > >> shareTable.dtfeatures["sScrollY"] = "200px" > >> shareTable.dtfeatures["sScrollX"] = "100%" > >> shareTable.virtualfields = shareVirtualFields() > >> shareTable.headers = "labels" > >> shareTable.showkeycolumn = False > >> shareTable.dtfeatures["bJQueryUI"] = > >> request.vars.get("jqueryui",True) > >> ## shareTable.uitheme = request.vars.get("theme","cupertino") > >> shareTable.uitheme = request.vars.get("theme","smoothness") > >> shareTable.dtfeatures["iDisplayLength"] = 25 > >> shareTable.dtfeatures["aaSorting"] = [[6,'desc']] > >> shareTable.dtfeatures["sPaginationType"] = request.vars.get( > >> "pager","full_numbers" > >> ) # two_button scrolling > >> shareTable.columns = ["gtree.id", > >> "virtual.tree_url", > >> "gtree.mtime", > >> "gtree.title", > >> "gtree.comment" ] > > >> shareTable.extra = dict(autoresize=True) > > >> return dict( ownedByUser = ownTable.create(), sharedWithUser = > >> ownTable.create() ) > > >> Here is my view : > > >> > > >> > >> Grafted Tables You Own > >> {{=ownedByUser}} > >> > > >> > >> Grafted Tables Shared With You > >> {{=sharedWithUser}} > >> > > >> > > > -- > > > -- > > Bruno Rocha > > [ About me:http://zerp.ly/rochacbruno] > > [ Aprenda a programar:http://CursoDePython.com.br] > > [ O seu aliado nos cuidados com os animais:http://AnimalSystem.com.br] > > [ Consultoria em desenvolvimento web:http://www.blouweb.com]
[web2py] windows xp and source web2py
Hi web2py users, I'm running a web2py server on a windows xp machine. Let's call it the kiosk machine. The kiosk machine has a static IP. I am able to ping the kiosk machine from other computers on the network. However, I'm unable to send an http request from a computer on the network to the kiosk machine. These are not administrative web pages. Why is this? I'm happy to provide more information if needed, thanks in advance. Chris
[web2py] Re: windows xp and source web2py
Ah, I see, thanks. This allows remote machines to hit the server, but the request receives a 200. Let's say this machine is on a secure network. If I wanted to hack web2py so that remote machines on the network could access the application, could I simply uncomment line 17 from applications/models/access.py ? #raise HTTP(200, T('Admin is disabled because insecure channel')) On Sep 6, 2:40 pm, Massimo Di Pierro wrote: > How are you starting web2py? > > You should be using > > python.exe web2py.py -i 0.0.0.0 -p 80 > > 0.0.0.0 means accessible publicly (if no firewall) and -p 80 sets the > port. > > On Sep 6, 2:15 pm, Christopher Baron wrote: > > > > > > > > > Hi web2py users, > > > I'm running a web2py server on a windows xp machine. Let's call it > > the kiosk machine. The kiosk machine has a static IP. I am able to > > ping the kiosk machine from other computers on the network. However, > > I'm unable to send an http request from a computer on the network to > > the kiosk machine. These are not administrative web pages. > > > Why is this? > > > I'm happy to provide more information if needed, thanks in advance. > > > Chris
[web2py] form.accepts returning false
Hi web2py users, When trying to update a row in a database table using the appadmin interface, it does not work. The same page returns with the original values. In the appadmin controller, form.accepts is returning false - this may have to do with a hack I've made to the controllers.appadmin.py file ( I've made changes such that one can access the appadmin remotely without an ssh tunnel or https ) How do I debug the form.accepts function in gluon ? How can I make changes to the gluon.sqlhtml code and reload these changes? Thanks in advance, Chris
[web2py] Re: form.accepts returning false
Form.errors is an empty storage object. So... it was unsubmitted ? How is this possible when I'm using the controllers/appadmin.py that comes with web2py ? On Sep 7, 2:01 pm, Rufus wrote: > Did you look at form.errors to find out why it returns false? > > If form.errors doesn't exist, the accepts() method didn't see > it as having been submitted, and will return false. > > See Example 28 in > > http://web2py.com/examples/default/examples > > for the three cases: unsubmitted, submitted no error, submitted w/ > error > > Rufus
[web2py] Re: form.accepts returning false
I don't believe I've taken the hidden fields out. The only thing I've changed in controllers/appadmin.py deals with redirection based on a remote user. I've written my own workaround, so I guess no one has to spend any more time dealing with this. Thanks for the assistance. On Sep 7, 3:11 pm, Cliff wrote: > If your form doesn't have the default hidden fields, the controller > assumes it's a resubmit and fails silently. > > Check out the book, Chapter 7, SQLFORMS. > > But why would you want to do this? > > On Sep 7, 2:05 pm, Christopher Baron wrote: > > > > > > > > > Hi web2py users, > > > When trying to update a row in a database table using the appadmin > > interface, it does not work. The same page returns with the original > > values. > > > In the appadmin controller, form.accepts is returning false - this may > > have to do with a hack I've made to the controllers.appadmin.py file > > ( I've made changes such that one can access the appadmin remotely > > without an ssh tunnel or https ) > > > How do I debug the form.accepts function in gluon ? > > > How can I make changes to the gluon.sqlhtml code and reload these > > changes? > > > Thanks in advance, > > > Chris
[web2py] modules and plugins
Hi web2py users, Let's say I have a lot of functions that I would like to include into a plugin. I do not want all of these functions in the controller of the plugin. What's the best way to include a large number of utility functions into a plugin ? Thanks in advance, Chris
[web2py] Moving away from define_table
Hi, I've been using web2py for a few years now. What I find most annoying is the DAL. I understand that its easy for people who don't have a programming background, but anytime I want to make changes to columns - I run into issues large and small. I'd simply prefer to manage my database without having web2py altering things. Please advise.