[web2py] Translation of the Online Book (to German) and general question about how to translate Wiki Pages

2016-01-04 Thread Jörg Schneider
At first I want to offer my help to translate the online book to German 
language (in the "books"-menu there is a translation of the Preface-Chapter 
of the 4th edition).

Second one is a newbie-question (I'm not a programmer so please be patient 
with me and provide me with the right reading matter):

I built a website with wiki pages (with help of the awesome online book). 
Because this website is meant to support refugees from Syria and from Iran 
we want to add extra pages with Arabic language and Farsi.

A lot of the refugees don't use only there smartphones with their native 
language but also computers with german language settings. So I think it 
would be a good choice to add manual language choice for "session".

Can anyone help with me with hints about how to use the built in wiki with 
different translations?

Thnx!

-- 
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/d/optout.


Re: [web2py] Translation of the Online Book (to German) and general question about how to translate Wiki Pages

2016-01-07 Thread Jörg Schneider
I don't really understand the concept of T. in a Wiki-context!?
How can I translate Wiki Pages with T-Function?

My approach was to provide a link or drop down box for the user and to 
offer separate wiki pages (edited in arabic or english language) like 
@ar_page1 and @en_page1 or @de_page1



Am Montag, 4. Januar 2016 21:32:36 UTC+1 schrieb Richard:
>
> About forcing translation :
>
> You will need to manually control translation with T.accepted_language I 
> guessm, Doc here :
>
>
> http://web2py.com/books/default/chapter/29/04/the-core?search=T.accepted_language
>
>
> if T.accepted_language.split('-')[0] == 'en':
> # english UI stuff
> elif T.accepted_language.split('-')[0] == 'ar':
> # arabic UI stuff
> etc.
>
> Richard
>
> On Mon, Jan 4, 2016 at 5:52 AM, Jörg Schneider  > wrote:
>
>> At first I want to offer my help to translate the online book to German 
>> language (in the "books"-menu there is a translation of the Preface-Chapter 
>> of the 4th edition).
>>
>> Second one is a newbie-question (I'm not a programmer so please be 
>> patient with me and provide me with the right reading matter):
>>
>> I built a website with wiki pages (with help of the awesome online book). 
>> Because this website is meant to support refugees from Syria and from Iran 
>> we want to add extra pages with Arabic language and Farsi.
>>
>> A lot of the refugees don't use only there smartphones with their native 
>> language but also computers with german language settings. So I think it 
>> would be a good choice to add manual language choice for "session".
>>
>> Can anyone help with me with hints about how to use the built in wiki 
>> with different translations?
>>
>> Thnx!
>>
>> -- 
>> 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/d/optout.
>>
>
>

-- 
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/d/optout.


Re: [web2py] Re: prettydate ago is not translated

2016-02-14 Thread Jörg Schneider
Thanks for the helpful hints in this thread - I had a similar question and 
editing the translation file on cli solved my problem with prettydate and 
"ago"-string!
But I have a question about "T=T". What does this mean?

Am Samstag, 11. Juli 2015 15:24:03 UTC+2 schrieb Maxim:
>
> To translate prettydate output  you have to pass translation function as 
> argument: prettydate(my_date, T=T).
>
> On Wednesday, July 8, 2015 at 12:40:55 AM UTC+3, icodk wrote:
>>
>> Thanks for your help.
>> My editor (web2py web interface, Notepad++,Visual Studio) should be able 
>> to find 'ago' in any sentence combination. It also found '%d weeks ago' 
>> as I wrote below so I can't see any reason why it should not find  "%d 
>> hours ago" unless it is not there. May be I am looking in the wrong 
>> file-but everything else works fine(I mean the other translations).
>>
>>
>> On Monday, July 6, 2015 at 8:10:39 AM UTC+2, xmarx wrote:
>>>
>>> you must look up the "%d weeks ago", "%d hours ago", "%d months ago" 
>>> phrases. 
>>> not just "ago". because i think item that be translated is T("%d days 
>>> ago"). not T("ago"). i don't know its detail.
>>>
>>>  In addition I can only find '%d weeks ago': '%d uge siden', in my 
 language file.
>>>
>>>
>>> this translate  used to be work. didn't it?
>>>
>>> 2015-07-05 1:49 GMT+03:00 icodk :
>>>
 There are two issues here, the first is that 'ago' it is NOT in my 
 language file and if you look in  gluon/tools.py you will see that 
 suffix = ' ago ' and NOT  suffix = T(' ago') . Anyway this is in my 
  gluon/tools.py file.
 OK I replaced  it with:  suffix = T(' ago') .which should be part of 
 the web2py in the first place or I am missing something.

 The second issue is that even if I replaced it as above I still can't 
 find 'ago' in my language file. In addition I can only find '%d weeks 
 ago': '%d uge siden', in my language file. Nothing else from prettydate 
 function in my language file.
 What am I doing wrong ?
 Thanks





 On Saturday, July 4, 2015 at 1:45:24 PM UTC+2, icodk wrote:
>
> Is there any reason why the 'ago' is not translate in 
> prettydate  (gluon/tools.py) ?
>
> *suffix = ' ago'* instead of:
> *suffix = ** T(" ago")*
>
> In Danish that will be translated to: 'siden'
> Also I can't find the other strings in my language file
> T('1 year' + suffix)
> T('1 month' + suffix)
> etc.
>
> I can only find:
> %d weeks ago
>
>
>
>
> -- 
 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/d/optout.

>>>
>>>
>>>
>>> -- 
>>> Selman Kocael
>>> İsabet Yayınları
>>>
>>>

-- 
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/d/optout.


[web2py] Re: CMS WEB2PY

2016-02-18 Thread Jörg Schneider
I was able to built a Custom-CMS for a refugee helper association only by 
watching the videos an reading the manual. I do only have really basic 
knowledge in programming and because Joomla and Wordpress didn't fit my 
needs I started from the scratch with web2py which is really a cool 
framework.
I just want to encourage you to go step by step and I promise that you will 
have a steep learning curve.

Am Dienstag, 13. Oktober 2015 16:11:20 UTC+2 schrieb Leonel Câmara:
>
> I may actually have to make a web2py CMS quite soon. I have a bunch 
> requirements that off-the-shelf CMSes don't fulfill but I would be really 
> interested in seeing your code Carlos, give us a heads up when you release.
>

-- 
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/d/optout.


[web2py] sqlite-Error with list:reference

2016-08-12 Thread Jörg Schneider
I want to reference a project with a list of auth.users and get 
'sqlite3.IntegrityError'> FOREIGN KEY constraint failed:

(self=, table=, fields=[(, 
'Beratung'), (, ['4', '6'])])

db.define_table('project',
Field('name'),
Field('project_member','list:reference auth_user')
)

db.project.project_member.requires = IS_IN_DB(db, 
'auth_user.id','%(first_name)s', db.auth_user._format, multiple=True)

What is wrong with my model definition?

-- 
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/d/optout.


[web2py] Re: Blog Template - Github

2016-12-13 Thread Jörg Schneider
Hallo Andrea,

gute Arbeit, Dein Blog. (darf ich Deutsch schreiben?) ;-)
Das ist ein von aufgepepptes Bootstrap-Theme?

Ich würde gern mehr über den Layer-Effekt wissen, der sich hinter der "read 
more" Funktion in der "about me"-Sektion verbirgt. So etwas in der Art 
würde ich gern auch in einem meiner web2py-Projekte verwenden: 
https://www.sprachbruecke-halle.de

good work, your Blog!
I'm interested in the layer effect behind the "read me"-button on your 
"about me" section.

Jörg

Am Dienstag, 13. Dezember 2016 04:57:13 UTC+1 schrieb Andrea Engel:
>
> Hi David,
>>
>
> I created a web2py blog as well a couple of month ago.
> So If you need some inspiration, here is the link: meadowlark.de
>
> I have to say, I don't maintain the blog on a regular basis as I just 
> created it for myself to proof to myself I can do this.
> However, I think a blog archive, maybe an "about me" section and maybe 
> even a search bar for tags and keywords are helpful features for a blog.
> As I said this is just inspiration for you. If you have any questions, 
> feel free to contact me. 
>
> I backup my work in Bitbucket, using SourceTree as my local repository. So 
> If you need help with that, let me know.
>

-- 
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/d/optout.


[web2py] Re: Blog Template - Github

2016-12-13 Thread Jörg Schneider
Oh! Yes, it looks like this: 
http://www.w3schools.com/bootstrap/bootstrap_modal.asp
Thank you Dave! I think the only one who missed some impressive advantages 
in the evolution form HTML4 to HTML5 is me. :'-)

Am Dienstag, 13. Dezember 2016 22:13:00 UTC+1 schrieb Dave S:
>
>
>
> On Tuesday, December 13, 2016 at 9:33:25 AM UTC-8, Jörg Schneider wrote:
>>
>> Hallo Andrea,
>>
>> gute Arbeit, Dein Blog. (darf ich Deutsch schreiben?) ;-)
>> Das ist ein von aufgepepptes Bootstrap-Theme?
>>
>> Ich würde gern mehr über den Layer-Effekt wissen, der sich hinter der 
>> "read more" Funktion in der "about me"-Sektion verbirgt. So etwas in der 
>> Art würde ich gern auch in einem meiner web2py-Projekte verwenden: 
>> https://www.sprachbruecke-halle.de
>>
>> good work, your Blog!
>> I'm interested in the layer effect behind the "read me"-button on your 
>> "about me" section.
>>
>> Jörg
>>
>>
> It looks like she uses some data tags to make the anchor behave in a modal 
> fashion.  (Is that an HTML5 feature, 
> or did I miss something from version 4?)
>
> /dps
>  
>
>> Am Dienstag, 13. Dezember 2016 04:57:13 UTC+1 schrieb Andrea Engel:
>>>
>>> Hi David,
>>>>
>>>
>>> I created a web2py blog as well a couple of month ago.
>>> So If you need some inspiration, here is the link: meadowlark.de
>>>
>>> I have to say, I don't maintain the blog on a regular basis as I just 
>>> created it for myself to proof to myself I can do this.
>>> However, I think a blog archive, maybe an "about me" section and maybe 
>>> even a search bar for tags and keywords are helpful features for a blog.
>>> As I said this is just inspiration for you. If you have any questions, 
>>> feel free to contact me. 
>>>
>>> I backup my work in Bitbucket, using SourceTree as my local repository. 
>>> So If you need help with that, let me know.
>>>
>>

-- 
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/d/optout.


Re: [web2py] Re: web2py 2.15.1

2017-06-09 Thread Jörg Schneider
+1

-- 
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/d/optout.


[web2py] Encrypted Fields / European General Data Protection Regulation

2017-07-27 Thread Jörg Schneider
Due to the coming changes in data protection laws in the EU it would be 
interesting to know if and how we could store sensible user data (which is 
everything that identifies a person) encrypted in the database.
Some institutions or associations will be forced to prove data protection 
(f.e. addresses or birthday) by design - which is nearly impossible without 
encryption. Are there some ideas?

-- 
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/d/optout.


[web2py] URL function in admin app adds "/_2.17.1/" to path variable

2018-08-29 Thread Jörg Schneider

After downloading 2.17.1 from Github I get wrong static URLs in the admin 
application:

response.files.insert(0,URL('static','js/jquery.js')) in web2py_ajax.js 
resolves the URL to 

[web2py] Re: URL function in admin app adds "/_2.17.1/" to path variable

2018-08-29 Thread Jörg Schneider
You made my day!!! It were this lines in 0.py

Hahaha, RTFM! I'm always finding new things in this book even I thought 
I've seen all chapters... 

Am Mittwoch, 29. August 2018 16:37:48 UTC+2 schrieb fiubarc:
>
> Hello, look at db.py ... probably you have uncommented these lines:
>
> # response.static_version = myconf.get('app.version')
> # response.static_version_urls = True
>
>
> http://www.web2py.com/books/default/chapter/29/04/the-core#Static-asset-management
>
>
>
> El miércoles, 29 de agosto de 2018, 11:08:32 (UTC-3), Jörg Schneider 
> escribió:
>>
>>
>> After downloading 2.17.1 from Github I get wrong static URLs in the admin 
>> application:
>>
>> response.files.insert(0,URL('static','js/jquery.js')) in web2py_ajax.js 
>> resolves the URL to 

[web2py] URL with link to anchor tag

2019-04-26 Thread Jörg Schneider
Is it possible to have request args and link like 
www.domain.org/a/c/index.html#anchor/args ?

-- 
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/d/optout.


[web2py] Re: URL with link to anchor tag

2019-04-28 Thread Jörg Schneider
Ouch - I'm so stupid: www.domain.org/a/c/index.html/*args**#anchor* was the 
answer!
 
Am Freitag, 26. April 2019 22:18:00 UTC+2 schrieb Anthony:
>
> On Friday, April 26, 2019 at 2:25:10 PM UTC-4, Jörg Schneider wrote:
>>
>> Is it possible to have request args and link like 
>> www.domain.org/a/c/index.html#anchor/args 
>> <http://www.google.com/url?q=http%3A%2F%2Fwww.domain.org%2Fa%2Fc%2Findex.html%23anchor%2Fargs&sa=D&sntz=1&usg=AFQjCNGEo1pK6fIAUH6DeJVRbN_aw0jaEg>
>>  
>> ?
>>
>
> The "#anchor/args" part of the URL does not get sent to the server. What 
> are you trying to achieve? 
>

-- 
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/d/optout.


[web2py] Re: nginx, basic auth: internal error

2019-05-10 Thread Jörg Schneider
Are you logged in in the admin application the same time (same browser) ?

Am Mittwoch, 8. Mai 2019 08:49:34 UTC+2 schrieb tomasz bandura:
>
> Hello,
>
> I use web2py (2.16.1) on 2 environments:
> 1. Embedded Rocket wsgi server
> 2. Deployed on nginx+uwsgi
>
> I have the same application on both env, connected to the same database.
> The application uses Basic Authentication, like in the example:
>
> def f1():
>
>   auth.basic()  if auth.user:
> *## do something ...*  else:
> *## raise defined auth exception*
>
>
> What is strange, the problem occures only on nginx+uwsgi: 
> 1. If I call it without basic authorization it will raise defined 
> exception correctly
> 2. The problem is when I put header with correct authorization - it raises 
> *Internal 
> error Ticked issued: uncoverable*, and there is no any traces in logs.
>
> The solution is putting *session.forget() *before *auth.basic()*, but why?
>
> Could someone explain me the impact of session.forget() for that behaviour?
>
> According documentation it is used to avoid storing session ( and it 
> is understandable)
>
> Regards,
> Tomasz
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/00c72abb-5b47-47e0-af73-bd4b190c5eb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Future of web2py

2020-02-24 Thread Jörg Schneider
Hello Massimo,

at first I want to give you a thousands thanks for creating and promoting 
web2py! I've learnt a lot from your Vimeo tutorials 5 years ago and was 
able to built helpful internal web based tools for non-profit organisations 
or choirs without great effort. With other words: I really appreciate 
web2py and the work of this community.

I understand, that the development of py4web is a necessary move and I 
really hope that I'm able to move my apps to the next level of web 
frameworks with your help. :-)


Am Freitag, 21. Februar 2020 04:51:18 UTC+1 schrieb Massimo Di Pierro:
>
> It will continue fix bugs. I will add new features as long the same 
> features overlap with py4web.
> Honestly web2py has not needed much attention in a while.
> I do recommend that people move their apps to py4web simply because I 
> believe the latter is better.
>
> On Tuesday, 18 February 2020 07:36:24 UTC-8, Clemens wrote:
>
>> Hello Massimo,
>>
>> I've understood, that py4web is the future. But I have one important 
>> question: Will web2py further maintained? And how long will it be 
>> maintained? I'm asking, because I've developed an application on web2py and 
>> I need to plan when it has to be migrated/re-implemented. And what do you 
>> think will be a factor (e.g. in percentage of the original implementation 
>> effort) to switch an application from web2py to py4web?
>>
>> Thanks in advance for a short answer!
>>
>> Best regards
>> Clemens
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ba58555b-6ada-4467-b97e-ae0e390f7cc8%40googlegroups.com.


[web2py] Migration from sqlite to mysql - different field-order

2020-03-02 Thread Jörg Schneider
I tried to migrate from sqlite database to mysql/mariadb but following the 
instructions 
on https://realpython.com/web2py-migrating-from-sqlite-to-mysql/ didn't 
work for me, because of different database scheme created by dal on mysql 
database. Unfortunately "fake_migrate=True" didn't work either.

For example:

db.define_table('repo', 
Field('title', requires=IS_NOT_EMPTY(), label='Liedtitel'),
Field('composer', default='unbekannt', label='Komponist'),
Field('lyrics', label='Liedtext'),
Field('arrangement', label='Liedsatz'),
Field('biblical', label='Bibelstelle'),
Field('genre', 'reference repository_genre', default='2'),
Field('purpose',requires=IS_IN_SET(PURPOSES), 
default=PURPOSES[0], label='Satz für'),
Field('pdf', 'upload', 
uploadfolder=os.path.join(request.folder, 'static/repository'), 
label='PDF-Datei'),
Field('transl', type='text', label='Übersetzung'),
Field('transl_file', 'upload', 
uploadfolder=os.path.join(request.folder, 'static/repository'), 
label='Anhang zur Übersetzung'),
auth.signature,
format='%(title)s %(composer)s'
   ) 

has following table in *sqlite*:


   1. id
   2. title
   3. composer
   4. lyrics
   5. arrangement
   6. *genre*
   7. 
*pdf *
   8. 
*transl *
   9. 
*transl_file *
   10. 
*status *
   11. 
*purpose *
   12. 
*biblical *
   13. 
*modified_by *
   14. 
*created_by *
   15. 
*created_on *


which has other order than created on the *mysql* table:


   1. id
   2. title
   3. composer
   4. lyrics
   5. arrangement
   6. biblical
   7. genre
   8. purpose
   9. pdf
   10. transl
   11. transl_file
   12. created_on
   13. created_by
   14. modified_on
   15. modified_by
   

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/551c1d7c-7a06-4592-b9ba-1bc2f5601438%40googlegroups.com.


[web2py] Re: Migration from sqlite to mysql - different field-order

2020-03-09 Thread Jörg Schneider
I want to migrate from existing sqlite db to mariadb. And the import in 
mariadb fails because of the different field order (wrong type, wrong data)

Am Mittwoch, 4. März 2020 10:48:56 UTC+1 schrieb Dave S:
>
>
>
> On Monday, March 2, 2020 at 11:19:10 AM UTC-8, Jörg Schneider wrote:
>>
>> I tried to migrate from sqlite database to mysql/mariadb but following 
>> the instructions on 
>> https://realpython.com/web2py-migrating-from-sqlite-to-mysql/ didn't 
>> work for me, because of different database scheme created by dal on mysql 
>> database. Unfortunately "fake_migrate=True" didn't work either.
>>
>> For example:
>>
>> db.define_table('repo', 
>> Field('title', requires=IS_NOT_EMPTY(), 
>> label='Liedtitel'),
>> Field('composer', default='unbekannt', label='Komponist'),
>> Field('lyrics', label='Liedtext'),
>> Field('arrangement', label='Liedsatz'),
>> Field('biblical', label='Bibelstelle'),
>> Field('genre', 'reference repository_genre', default='2'),
>> Field('purpose',requires=IS_IN_SET(PURPOSES), 
>> default=PURPOSES[0], label='Satz für'),
>> Field('pdf', 'upload', 
>> uploadfolder=os.path.join(request.folder, 'static/repository'), 
>> label='PDF-Datei'),
>> Field('transl', type='text', label='Übersetzung'),
>> Field('transl_file', 'upload', 
>> uploadfolder=os.path.join(request.folder, 'static/repository'), 
>> label='Anhang zur Übersetzung'),
>> auth.signature,
>> format='%(title)s %(composer)s'
>>) 
>>
>> has following table in *sqlite*:
>>
>>
>>1. id
>>2. title
>>3. composer
>>4. lyrics
>>5. arrangement
>>6. *genre*
>>7. 
>> *pdf *
>>8. 
>> *transl *
>>9. 
>> *transl_file *
>>10. 
>> *status *
>>11. 
>> *purpose *
>>12. 
>> *biblical *
>>13. 
>> *modified_by *
>>14. 
>> *created_by *
>>15. 
>> *created_on *
>>
>>
>> which has other order than created on the *mysql* table:
>>
>>
>>1. id
>>2. title
>>3. composer
>>4. lyrics
>>5. arrangement
>>6. biblical
>>7. genre
>>8. purpose
>>9. pdf
>>10. transl
>>11. transl_file
>>12. created_on
>>13. created_by
>>14. modified_on
>>15. modified_by
>>
>>
>
> How does the different field order affect you?  DAL query results within a 
> row are accessed by field name.  DAL inserts and updates also use field 
> names, no?
>
> /dps
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ad5ed150-bae3-43c4-9503-26e4572a4a11%40googlegroups.com.


Re: [web2py] Migration from sqlite to mysql - different field-order

2020-03-09 Thread Jörg Schneider
Yes, you are right. And in my understanding of Migrations 
<http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=sqlite#Migrations>
 the 
"status" field is a remaining row that should should disappear after 
successful migration. I tried to force migrations but it doesn't seem to 
happen. :-/

Am Mittwoch, 4. März 2020 12:33:50 UTC+1 schrieb Massimiliano:
>
> Try to recreate the table in sqlite too,  because doesn't reflect you 
> schema in define_table
>
> there is a "status" field not present in the definition and is 
> "modified_on" ismissing.
>
>
>
> On Mon, Mar 2, 2020 at 8:19 PM Jörg Schneider  > wrote:
>
>> I tried to migrate from sqlite database to mysql/mariadb but following 
>> the instructions on 
>> https://realpython.com/web2py-migrating-from-sqlite-to-mysql/ didn't 
>> work for me, because of different database scheme created by dal on mysql 
>> database. Unfortunately "fake_migrate=True" didn't work either.
>>
>> For example:
>>
>> db.define_table('repo', 
>> Field('title', requires=IS_NOT_EMPTY(), 
>> label='Liedtitel'),
>> Field('composer', default='unbekannt', label='Komponist'),
>> Field('lyrics', label='Liedtext'),
>> Field('arrangement', label='Liedsatz'),
>> Field('biblical', label='Bibelstelle'),
>> Field('genre', 'reference repository_genre', default='2'),
>> Field('purpose',requires=IS_IN_SET(PURPOSES), 
>> default=PURPOSES[0], label='Satz für'),
>> Field('pdf', 'upload', 
>> uploadfolder=os.path.join(request.folder, 'static/repository'), 
>> label='PDF-Datei'),
>> Field('transl', type='text', label='Übersetzung'),
>> Field('transl_file', 'upload', 
>> uploadfolder=os.path.join(request.folder, 'static/repository'), 
>> label='Anhang zur Übersetzung'),
>> auth.signature,
>> format='%(title)s %(composer)s'
>>) 
>>
>> has following table in *sqlite*:
>>
>>
>>1. id
>>2. title
>>3. composer
>>4. lyrics
>>5. arrangement
>>6. *genre*
>>7. 
>> *pdf *
>>8. 
>> *transl *
>>9. 
>> *transl_file *
>>10. 
>> *status *
>>11. 
>> *purpose *
>>12. 
>> *biblical *
>>13. 
>> *modified_by *
>>14. 
>> *created_by *
>>15. 
>> *created_on *
>>
>>
>> which has other order than created on the *mysql* table:
>>
>>
>>1. id
>>2. title
>>3. composer
>>4. lyrics
>>5. arrangement
>>6. biblical
>>7. genre
>>8. purpose
>>9. pdf
>>10. transl
>>11. transl_file
>>12. created_on
>>13. created_by
>>14. modified_on
>>15. modified_by
>>
>> -- 
>> 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 web...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/551c1d7c-7a06-4592-b9ba-1bc2f5601438%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/web2py/551c1d7c-7a06-4592-b9ba-1bc2f5601438%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> Massimiliano
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/7a00c8dc-231b-4c04-b8b7-6445a10db3d3%40googlegroups.com.