Re: [web2py] Migrating a hude database from Spring to web2py

2014-01-09 Thread Tushar Tuteja
No,
I don't want to alter the 5 tables schema.
But I want to perform CRUD operations.
And it would be great if somehow I can restrict web2py from altering table
schemas all together as a J2EE application is running on the same the DB
and DB is a remote DB.
thanks,
Tushar Tuteja


On 9 January 2014 18:45, Paolo Valleri  wrote:

> Mind that DAL should be instantiated with fake_migrate_all;
> run your app once, then you can set it to false. This operation will
> create several files (one for each defined table) in the app/databases/
> directory
>
> moreover, do you need to alter the 5 tables you mentioned?
>
> Paolo
>
>
> On Thursday, January 9, 2014 12:59:18 PM UTC+1, Michele Comitini wrote:
>
>> Instantiate the DAL with fake_migrate=True, migrate=False,migrate_enable=
>> False
>> Define the tables with only the fields you are going to need in a model
>> file.
>> This is going to create the metadata needed by web2py without touching
>> your legacy database schema.
>>
>>
>>
>>
>> 2014/1/9 Tushar Tuteja 
>>
>>> I have a J2EE application and a database which has 200 tables in it.
>>> I want to develop a new application using web2py, which would use only 5
>>> tables.
>>> I want to know how should I go about it. As I am not clear about how I
>>> would use database without mapping all the 200 tables which is a huge task.
>>> and I don't want web2py to make any changes on the database tables and
>>> their schema.
>>> only crud operations on the records of the 5 tables.
>>>
>>> Thanks,
>>> Regards,
>>> Tushar Tuteja
>>>
>>> --
>>> Resources:
>>> - http://web2py.com
>>> - http://web2py.com/book (Documentation)
>>> - http://github.com/web2py/web2py (Source code)
>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+un...@googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/BPabc0lulcw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Tushar Tuteja
Undergraduate Student(Fourth Year)
Civil Engineering
IIT Delhi
+919953061943
ttut...@gmail.com 
ce1090...@civil.iitd.ernet.in
"The question isn't who is going to let me; its who is going to stop me!" -
Howard Roark

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Migrating a hude database from Spring to web2py

2014-01-09 Thread Tushar Tuteja
I have a J2EE application and a database which has 200 tables in it.
I want to develop a new application using web2py, which would use only 5 
tables.
I want to know how should I go about it. As I am not clear about how I 
would use database without mapping all the 200 tables which is a huge task.
and I don't want web2py to make any changes on the database tables and 
their schema.
only crud operations on the records of the 5 tables.
 
Thanks,
Regards,
Tushar Tuteja

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: MongoDb

2013-12-30 Thread Tushar Tuteja
Hey,
Thanks for the answer. Luckily there are no joins, but I need to see what
web2py features of DAL won't work.
Thanks,
Regards,
Tushar Tuteja



On 30 December 2013 16:44, Alan Etkin  wrote:

> I have an app running on MySQL , I want to use mongoDB instead.
>> I want to help on migration from mysql to mongoDB.
>> Thanks,
>>
>
> Beware that mongodb adapter is in an experimental stage of development, so
> you should know what you are doing before migrating. I suppose there are
> lots of howtos for migrating data between those backends. The web2py way of
> doing has two options, AFAIK:
>
> - use cpdb (never tried it with those connections)
> - use DAL.import_from_csv_file and DAL.export_from_csv_file methods (for a
> small amount of db records)
>
> Mind that the most important issue is that mongodb is not a relational
> database management system and there's no such thing as JOIN queries. This
> is a limitation for web2py also, since some of the web2py features require
> joins to work.
>
>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/oPCXZnnFvyI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Tushar Tuteja
Undergraduate Student(Fourth Year)
Civil Engineering
IIT Delhi
+919953061943
ttut...@gmail.com 
ce1090...@civil.iitd.ernet.in
"The question isn't who is going to let me; its who is going to stop me!" -
Howard Roark

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] MongoDb

2013-12-30 Thread Tushar Tuteja
I have an app running on MySQL , I want to use mongoDB instead. 
I want to help on migration from mysql to mongoDB.
Thanks,

regards,

Tushar Tuteja

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: File upload through Ajax

2013-11-12 Thread Tushar Tuteja

Hey,
the example isn't working 
I am using on ubuntu12.04
thanks,
regards,

On Monday, November 11, 2013 7:53:36 PM UTC+5:30, Leonel Câmara wrote:
>
> Here's an example:
>
> http://in10min.blogspot.pt/2013/04/web2py-implement-multiple-files-upload.html
>
> Segunda-feira, 11 de Novembro de 2013 14:07:38 UTC, Tushar Tuteja escreveu:
>>
>> Hey,
>> I want to upload a file, but I want that file to be uploaded via ajax.
>> Is there an example code to do so in web2py.
>> A fully functional app would be of great help.
>> That just uploads one single file to the server from the index page and 
>> then displays that image in the list on the same page.
>> No authorization is required
>> Just file upload through ajax
>>
>> thanks,
>>
>> regards,
>>
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] File upload through Ajax

2013-11-11 Thread Tushar Tuteja
Hey,
I want to upload a file, but I want that file to be uploaded via ajax.
Is there an example code to do so in web2py.
A fully functional app would be of great help.
That just uploads one single file to the server from the index page and 
then displays that image in the list on the same page.
No authorization is required
Just file upload through ajax

thanks,

regards,


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Tushar Tuteja
thanks a ton,
I ll try this and what would be appropriate place to insert the file , so
that it is not efficient.

thanks,

regards,

Tushar Tuteja


On 17 October 2013 00:22, Niphlod  wrote:

> the scheduler is running fine.
> In the data you pasted here there's the reason why the scheduler isn't
> picking up any new task.
> times_run is 3 and repeats is set to 3, so the task got executed 3 times
> already.
>
> Sidenote: append a "return 1" to your function, so you'll get
> scheduler_run records holding more details about the executions, until you
> figure out the issues you're having on what to choose when you queue the
> task.
>
> Also, please do
>
> sched = Scheduler(db, dict(fun=func))
>
> sched.queue_task('func', uuid='test_insert', repeats=3, period=10)
>
> without any worker running, so you can see what is inserted into the
> scheduler_task table correctly.
> Execute the sched.queue_task just one time only (if you put that in
> models, it will be executed at every request and that would be inefficient)
>
>
>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/Zs7NODudXSE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Tushar Tuteja
Undergraduate Student(Fourth Year)
Civil Engineering
IIT Delhi
+919953061943
ttut...@gmail.com 
ce1090...@civil.iitd.ernet.in
"The question isn't who is going to let me; its who is going to stop me!" -
Howard Roark

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Scheduler on Ubuntu Worker name

2013-10-16 Thread Tushar Tuteja
Hey I am using web2py on ubuntu.
I am trying to use the scheduler but there is not workers name that is 
coming .
and the task is always queued and it never runs.
I followed the video on Vimeo on scheduler.
it runs on mac but not on ubuntu.
apparently my app is hosted on a ubuntu server.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Amazon RDS Connection String

2013-09-25 Thread Tushar Tuteja
connection string is fine , I was unable to mange the security group.

On Tuesday, September 24, 2013 1:32:24 AM UTC+5:30, Massimo Di Pierro wrote:
>
> What's your connections string?
>
> On Monday, 23 September 2013 14:12:53 UTC-5, Tushar Tuteja wrote:
>>
>> hey
>> I am using turnkey on EC2,
>> I am unable to connect o my db
>> it says unable to connect. 
>> is their is some problem with the connection string ?
>> or security groups ?
>>
>>
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Mail Not Working

2013-09-25 Thread Tushar Tuteja
Hey I hosted my site on EC2.
when I use the host as ip address, I am able to send the mails. 
But when use my domain mydomain.com instead of an ip address it gives me 
following error
"Mail.send failure:[Errno -3] Temporary failure in name resolution "

thanks,

regards,



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Amazon RDS Connection String

2013-09-23 Thread Tushar Tuteja
hey
I am using turnkey on EC2,
I am unable to connect o my db
it says unable to connect. 
is their is some problem with the connection string ?
or security groups ?



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Amazon RDS

2013-09-23 Thread Tushar Tuteja
he it is just the end point ?

On Tuesday, January 15, 2013 10:41:05 AM UTC+5:30, Simon Ashley wrote:
>
> Wondering if it is possible to connect an EC2 instance/ application to a 
> RDS instance (MYSQL), and what the connection string should be?
> There is some discussions here implying that it may be possible but 
> uncertain of the connection string. 
> What's been suggested is db = DAL('mysql//"*connection string - endpoint?*"') 
> but that looks wrong and hasn't worked.
> Any one clues on this?
> TIA
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Uploads not working when file is uploaded using SLQFORM.factory

2013-09-10 Thread Tushar Tuteja
I have created a form using SQLFORM.factory

import os
form=SQLFORM.factory(

Field('image','upload',uploadfolder=os.path.join(request.folder,'uploads/'))
)

I am using form.vars.image to populate a db table
the file is being uploaded with a changed name. that changed name is 
populated into my db field
but when I use "{{=URL('download', args=record.image)}}"

it gives me a 404 error

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: crud not updating

2013-08-11 Thread Tushar Tuteja
I face the same problem, I am using a latest version of web2py and 
doing crud.settings.detect_record_change = False 
doesn't make changes

On Tuesday, August 30, 2011 10:37:54 PM UTC+5:30, simon wrote:
>
> Works with crud.settings.detect_record_change = False 
>
> Without this it fails any time you make 2 edits to the same record 
> within a session. Does not have to be 2 sequential changes e.g. I 
> change record 1 then record 2 then record 3.then try to update 
> record 1 again and it fails. 
>
> On Aug 30, 4:15 am, Anthony  wrote: 
> > Yes, that is in fact the problem, but shouldn't you be able to make two 
> > edits to a record in a row without an intervening failure? It's not just 
> > that a failure message is missing -- the behavior seems wrong. 
> > 
> > Anthony 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > On Monday, August 29, 2011 10:44:35 PM UTC-4, Massimo Di Pierro wrote: 
> > 
> > > Can you try? 
> > 
> > > crud.settings.detect_record_change = False 
> > 
> > > SQLFORM has a mechanism to prevent two users from doing this: 
> > 
> > > user 1) visualize and edit record 
> > > user 2) visualize and edit record 
> > > user 1) save changes 
> > > user 2) save changes and override changes by user 1 
> > 
> > > in SQLFORM it is disabled by default. In crud it is enabled by 
> > > default. 
> > 
> > > crud.settings.detect_record_change = True 
> > 
> > > Still something is wrong because you should get a message about it. 
> > 
> > > On Aug 28, 2:18 pm, apple  wrote: 
> > > > If the database fails to update within CRUD is there a way I can 
> view 
> > > > the error? 
> > 
> > > > I have a controller with this code that works fine: 
> > > >form=SQLFORM(table,a.id) 
> > > >if form.accepts(request.vars, session): 
> > > >response.flash="record updated" 
> > 
> > > > I replace it with: 
> > > >   form=crud.update(table, a.id) 
> > 
> > > > Now it works fine the first time the form is changed. Then the 
> second 
> > > > time it correctly calls the controller but the database is not 
> updated 
> > > > and the form reverts to the pre-change values. This continues so on 
> > > > odd submits it works and even submits it does not. 
> > 
> > > > It also seems to work on all submits when I excluded certain fields. 
> I 
> > > > am thinking maybe there is a database error thrown inside CRUD but 
> no 
> > > > error message is logged.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.