Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #77275
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'column': 0.07; 'definitions.': 0.07; 'modify': 0.07; 'subject:code': 0.07; 'table.': 0.07; 'definition,': 0.09; 'inserted': 0.09; 'overwrite': 0.09; 'xml.': 0.09; 'cc:addr:python-list': 0.11; 'stored': 0.12; 'creates': 0.14; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'patches': 0.16; 'simplest': 0.16; 'subject:python': 0.16; 'appropriate': 0.16; 'wrote:': 0.18; 'mechanism': 0.19; 'aug': 0.22; 'cc:addr:python.org': 0.22; 'adds': 0.24; 'instance,': 0.24; 'cc:2**0': 0.24; 'order.': 0.26; 'downloaded': 0.26; 'header:In-Reply-To:1': 0.27; 'patch': 0.29; 'xml': 0.29; 'sets': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; "skip:' 10": 0.31; 'quite': 0.32; 'cases': 0.33; 'fri,': 0.33; 'raw': 0.33; 'table': 0.34; "i'd": 0.34; 'problem': 0.35; 'tool': 0.35; 'case,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'data,': 0.36; 'described': 0.36; 'right?': 0.36; 'scheme': 0.36; 'done': 0.36; 'doing': 0.36; 'expressed': 0.37; 'version,': 0.38; 'pm,': 0.38; 'previous': 0.38; 'users': 0.40; 'field': 0.63; 'more': 0.64; 'effectively': 0.66; 'latest': 0.67; 'frank': 0.68; 'to:none': 0.92 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=X9GNEIdSw/AZXe7Ktr2gYaZoEFGtrOC5ehOSILZsRfM=; b=C8V9nZKixWr1k0lFTJZWLCVunuhvnJiuITNtCarOkpm4PkUpm0MalKJefS3ko4INsy hBviv7snZ/CooBefcbd0GYu8eeVhTC2NAeuLMnmCN6oY0ridN/Vh5/D+bVnAyFSkqDmw DUAih9SSHhy/b8ZTXoLk2bIkFRLO9jf3rqzamx/UfXkLIGUr/3uXfzzg9cBXAIKO6lN8 3MbFqqDNwSuQNMcDaQnJvl/c7OxwHJdwPGNzdFx6x8X3GVLys0QK2ueQ+KssaotQZu0o ZBzoj9nLr+v0IFJ/KlY37vPBmNA0fYF5myvEfLxFbsP5voh5WYKPL9cvjT+EAI6aDLDx CCaw== |
| MIME-Version | 1.0 |
| X-Received | by 10.50.176.202 with SMTP id ck10mr4287325igc.2.1409319678758; Fri, 29 Aug 2014 06:41:18 -0700 (PDT) |
| In-Reply-To | <ltpvb6$16e$1@ger.gmane.org> |
| References | <ltpseg$p9m$1@ger.gmane.org> <CAPTjJmrJBciRuterUKWP=QTQXd8xYquM4nx+oFd-TWM5ooskbA@mail.gmail.com> <ltpvb6$16e$1@ger.gmane.org> |
| Date | Fri, 29 Aug 2014 23:41:18 +1000 |
| Subject | Re: Keeping python code and database in sync |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.13609.1409319686.18130.python-list@python.org> (permalink) |
| Lines | 25 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1409319686 news.xs4all.nl 2924 [2001:888:2000:d::a6]:52460 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:77275 |
Show key headers only | View raw
On Fri, Aug 29, 2014 at 11:31 PM, Frank Millman <frank@chagford.com> wrote: > Right now I am writing a tool to allow users to view and modify menu > definitions. The tool is effectively a form definition, which in my system > is expressed in xml and stored in the database in the 'sys_form_defns' > table. The raw xml will be uploaded as part of the commit, and will be > downloaded when someone pulls the latest version, but it still has to be > inserted into the database before it is accessible. > > It is not a problem - I can use the same mechanism that you described - but > it will be happening quite a lot until the system settles down. The system I described is intended for cases where each edit builds on the previous ones - for instance, if patch 4 creates a table and patch 7 adds a column to it, you have to have done them in that order. But for that XML data, it sounds as if each update completely overwrites all previous ones - is this right? In that case, I'd simplify it: after doing all the other patches (anything more complicated than "update this one column" can still go through a patching scheme like I described), you just hard code an overwrite that sets the appropriate field to the current XML. You don't need to update it through all the previous states just to get to this one. Basically, take the simplest approach that will do what you want :) ChrisA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Keeping python code and database in sync Chris Angelico <rosuav@gmail.com> - 2014-08-29 23:41 +1000
csiph-web