#pyramid

/

      • iri`away has quit
      • digitalsatori joined the channel
      • mirko
        adding an object to DBSession doesn't seem to be enough to access its related objects. DBSession.flush() however seems to do the job. is that the proper way to do so?
      • iri`away joined the channel
      • invoice = Invoice() ; invoice.flush() ; invoice.user_id = req.authenticated_userid ; print user.name
      • joules
        eek
      • mirko
        *print invoice.user.name
      • without the flash invoice.user is <None>
      • joules
        Is that sqlalchemy?
      • mirko
        *flush
      • yep
      • joules
        ugh
      • can't help.
      • Understanding data structures makes better programmers, I really hope your database schema is well structured, accounting systems can be quite involved.
      • mirko
        joules: that's the goal
      • iri`away has quit
      • first weeks working materials were pen&paper
      • joules
        well you now commited to a paradigm.
      • mirko
        ?
      • joules
        Why people insist on using an ORM for complex data structures.
      • mirko
        i get behaviours i didn't expect and need methods i didn't know i need to achieve what more or less exactly what i wanted to achive by design
      • joules: i'm still not sure i get what you wanna tell me :) but it's also getting late here..
      • joules
        mirko: I'm argueing the time involving in figuring out the paradigm of sqlalchemy could be spent understanding SQL and (I hope) postgres.
      • mirko
        i think i understand SQL (at least Postgres and MySQL) fairly well. yes, we'll see whether using an ORM and/or sqlalchemy in particular, was the right choice..
      • joules
        Data is king.
      • zupo_ has quit
      • users are the jokers, middleware is the queen, data is king.
      • mirko
        hehe
      • joules
        That's my quote©. you can use it.
      • accouting systems are essentially tracking systems. Once an invoice has been generated and "POSTED" to the general ledger, you don't cancel it. You reverse it.
      • mirko
        might do(TM)
      • joules: i know. i consider that as an archive
      • append-only
      • joules
        it's generally frowned upon but an "UNPOSTED" invoice should be allowed within 1hour and within the same DATE by an administrator.
      • Just post another invoice to the AR/AP (depends on the direction of the invoice).
      • joules is on his 5th or 6th accounting system ...
      • i forget.
      • pydanny has quit
      • stevepie_
        german tax authorities have too much time on their hands if they have such an onerous requirement
      • nszceta joined the channel
      • shredding joined the channel
      • joules
        GAAP
      • I agree with it.
      • shredding has quit
      • mirko
        i'm surely no big fan of german authorities but at least it makes sense this time
      • joules
        If an invoice is generated and provided as a log of the transaction to relevevant parties. And they encounter an error and return it to be rectified. This is just reflected in the accounting system.
      • shredding joined the channel
      • So you started with 2 transactions (credit -> debit) you now have 6 :)
      • My first accounting system was an abomination, then we got audited.
      • I got schooled by some old accountant. He was right.
      • shredding has quit
      • Lcaracol joined the channel
      • mgrbyte has quit
      • mirko
        joules: i'm having accountats / tax consultants on my side. and i'm coming from C as a programming languages. so i wonder about every function i use whether it exactly does what i want in regard of atomic operations, possible race conditions, etc.
      • so right now i'm confident. time might teach me otehrwise of course :)
      • oh, and it seems the unique-contraint doesn't make it down to the actual database scheme
      • shouldn't result UniqueConstraint(number, rev) into sth. in the database scheme?
      • shredding joined the channel
      • digitalsatori has quit
      • digitalsatori joined the channel
      • shredding joined the channel
      • c0le joined the channel
      • shredding has quit
      • joules
        I just hope invoice isn't a wrapper of an invoice table via some ORM convenience
      • Too many layers (paradigms) to worry about pyramid_tm/ORM/+plus whatever else - Trying to dictate to the king how to run his kingdom...unless he's a moron - then fair enough!
      • or you intend on overthrowing the king (SQL backend swap out. See ORM conveniences)
      • m8 has quit
      • Swambo_ joined the channel
      • joulez joined the channel
      • Keresi joined the channel
      • mejymejy joined the channel
      • joules has quit
      • elliot has quit
      • keitheis has quit
      • Keresian has quit
      • wwitzel3 has quit
      • roughbot has quit
      • graffic has quit
      • zewt_ joined the channel
      • ree_ joined the channel
      • elliot_ joined the channel
      • keitheis joined the channel
      • digitalsatori joined the channel
      • bbradley joined the channel
      • wwitzel3_ joined the channel
      • wwitzel3_ is now known as wwitzel3
      • mejymejy has quit
      • roughbot joined the channel
      • a7p joined the channel
      • graffic joined the channel
      • pagenoare joined the channel
      • kiorky joined the channel
      • RicoAlpha joined the channel
      • stevepiercy[away is now known as stevepie_
      • sakal has quit
      • rickmak has quit
      • stevepiercy joined the channel
      • BlueAidan joined the channel
      • digitalsatori has quit
      • x58
        raydeo: Are you around?
      • nszceta has quit
      • supton has quit
      • nmix has quit
      • chrisgeorge_ joined the channel
      • supton joined the channel
      • chrisgeorge has quit
      • nmix joined the channel
      • chrisgeorge joined the channel
      • blaflamme
        aclark, wiggy: I meant to install extra requires you define in setup.py
      • mejymejy joined the channel
      • icedburg joined the channel
      • icedburg
        hey, is anyone here familiar with voluptuous?
      • mejymejy has quit
      • x58
        What a shitty name for a library.
      • icedburg
        x58: no kidding. every time I google it half the results are feminist rants about eating decisions
      • x58
        It reminds me a lot of colander
      • icedburg
        the name, or the library itself?
      • x58
      • The library itself reminds me of colander.
      • icedburg
        yeah, I've messed with colander before
      • they definitely have their similarities
      • I'm currently working on a web app in which you can post to a feed
      • you can attach different types of tags to a given post
      • I'm trying to figure out how to limit the number of tags on a post when they're of a certain type
      • I can limit tags in general with this schema: https://gist.github.com/grlindburg/e5463b03a87b...
      • no idea how to verify types while validating, however
      • x58
        Write your own validator?
      • icedburg
        sounds scary, but I'll try
      • x58
        I meant for that particular sub-part of the schema
      • It's a function according to the voluptuous docs.
      • icedburg
        are you looking at them on github?
      • x58
      • specfically look at validate_email
      • icedburg
        thanks x58, you rock
      • I'm still more or less padawan level when it comes to sorting through docs effectively
      • nmix has quit
      • blaflamme has quit
      • inklesspen
        that is a really stupid package name
      • especially given the first sentence of the pypy page: "Voluptuous, despite the name, is a Python data validation library."
      • x58
        I really want to open a ticket on his github to tell him to change the name...
      • nmix joined the channel
      • nmix has quit
      • nmix joined the channel
      • cguardia joined the channel
      • antons joined the channel
      • icedburg
        do it!
      • antons has quit
      • antons joined the channel
      • shredding joined the channel
      • nmix has quit