#django

/

      • varun88 joined the channel
      • jarshwah_
        fwiw, I'd begin the try just before the transaction.atomic() line, and have the except just after the transaction block
      • aatish910
        ipdb> Venue.objects.count() == 132 Venue.objects.get(tm_id='KovZpZA1E1AA') <Venue: International Motorsports Hall of Fame>
      • jarshwah_
        so it does already exist
      • len(venue_ids) ?
      • aatish910
        133
      • iiie has quit
      • jarshwah_
        [v.id for v in venues_from_api if v.id = 'KovZpZA1E1AA']
      • aatish910
        [u'KovZpZA1E1AA']
      • jarshwah_
        .. wtf
      • aatish910
        yeah, how could this be?
      • jarshwah_
        print(state_code)
      • print(STATE_CHOICES)
      • aatish910
        AL
      • jarshwah_
        hmm that might be quite long
      • aatish910
        yeah, that's django-localflavor choices
      • jarshwah_
        hmm if there were dupe venue ids across states, your venue_ids should catch it
      • mreznik joined the channel
      • aatish910
        yeah, exactly. maybe issues with mysql lib?
      • jarshwah_
        the only thing I can do now, is recommend printing out each v.id as you iterate, then sort/compare them by eye to see if there's anything funky
      • aatish910
        doing it now.
      • miz- joined the channel
      • arifin4web has quit
      • pmdarrow has quit
      • thaxy joined the channel
      • harmaahylje
        Could anyone suggest a tool/service to monitor package updates? One that can keep an eye on django and python packages, possibly even javascript ones.
      • aatish910
        jarshwah_, nothing interesting on ids except that some are actually smaller than 12 chars. Here is the schema on the db : https://dpaste.de/Km9H
      • Some ids: KovZpZA1E1AA KovZpZA1E17A KovZpZA1E1aA
      • KovZpZA1E1aA, KovZpZA1E17A are saved then (KovZpZA1E1AA) comes and gives that error.
      • LysergicDreams joined the channel
      • jarshwah_
        ok before you do vsave.save() ..
      • do a print(Venue.objects.filter(tm_id='KovZpZA1E1AA').count())
      • and do the same thing in your IntegrityError handler
      • along with the current v.id
      • not_a_web_devbot joined the channel
      • aristippos has quit
      • aatish910: I gotta go, good luck.. if you figure it out, please message me and let me know what the problem was
      • (I'll be idling)
      • timkofu
        not_a_web_devbot: Are we supposed to just take your word for it?
      • paratox has quit
      • aatish910
        jarshwah_, sure. thanks.
      • zopsi joined the channel
      • not_a_web_devbot has quit
      • ubuntu_aze has quit
      • jarshwah_, if you are still there, KovZpZA1E1aA == KovZpZA1E1AA
      • scunion has quit
      • jas02 joined the channel
      • mitaka joined the channel
      • Lannistyr has quit
      • blackcross has quit
      • jas02 has quit
      • aossama has quit
      • thaxy has quit
      • hamub has quit
      • aossama joined the channel
      • foxmask
        bonjello
      • timkofu
        yep
      • patjouk joined the channel
      • Xpl01t3r joined the channel
      • Xpl01t3r is now known as rads
      • holler has quit
      • rads
        hey guys. vps vs heroku- which one should i prefer for django hosting?
      • cybojenix
        rads, it really depends on what you need
      • FunkyBob
        heroku won't require you to know how to maintain and secure a server
      • cybojenix
        FunkyBob, is heroku one of those ones where you don't get access?
      • FunkyBob
        you get some access... it's a PaaS
      • rads
        ok. but does it offer freedom as vps offers? being used to working with ubuntu, how different will it be?
      • FunkyBob
        no
      • hylje
        very different
      • heroku gives you a shelf on which to put your code
      • and magic happens
      • a vps gives you ubuntu
      • FunkyBob
        I have clients who run their business on Heroku... you can do a lot with it
      • but it's no VPS
      • rads
        ok.is it as affordable though?
      • FunkyBob
        if you use it right, yes
      • rads
        i don't get the concept of dyno
      • hylje
        it depends
      • FunkyBob
        think of a dyno like a tiny container
      • rads
        i run djangochannels,mongodb,celery all in the same project
      • which one should i prefer for this purpose?
      • hylje
        heroku gives you more control over how much resources you use, but the resources come at a higher premium compared to you running those things on a vps
      • FunkyBob
        but they're managed for you
      • ask yourself -- how much would it cost you in ops time / employment
      • govg has quit
      • rads
        ok
      • FunkyBob
        also... mongodb? really?
      • adsworth joined the channel
      • hylje
        w e b s c a l e
      • cybojenix
        FunkyBob, not this again
      • FunkyBob
        heh
      • not as your primary data store, though, rads ?
      • cybojenix
        FunkyBob, seriously, it turned into an all out war last time
      • rads
        its just for logging
      • arifin4web joined the channel
      • mixture of sql and mongodb
      • FunkyBob
        ah
      • cybojenix
        that reminds me actually, need to shut down our mongo instance
      • DrCuriosity uses mongodb occasionall for throwing around non-mission-critical blobs of JSON, and Postgres or Mariadb (in a pinch) for production stuff.
      • *cough* I'm still on mysql
      • DrCuriosity
        Mariadb is mostly the same as MySQL. Mostly.
      • k_sze[work]
        Is there a way to make a QuerySet ordered pseudorandomly in a deterministic way? i.e. somehow seed the randomness and get the same "random" order eveyrtime
      • FunkyBob
        DrCuriosity: just as many "wtf" behaviors?
      • k_sze[work]: add a seeded random field?
      • DrCuriosity
        Probably. And just enough marginally different "wtf" behaviours to keep you on your toes :-P
      • FunkyBob
        for instance, annotate with a field that hashes a candidate key with your seed
      • DrCuriosity
        (Still has the same utf8 vs uft8mb4 issues that were making a CMS sad when people used 4-char emojis, though.)
      • rads has quit
      • InfoTest has quit
      • bochecha joined the channel
      • jas02 joined the channel
      • kukulogy has quit
      • cybojenix
        I'll be honest, never had a wtf issue. there are some "nice to haves" in postgres, but nothing to warrant migrating over
      • for one, our migrations simply won't run for some reason
      • FunkyBob
        well, today I rolled out an app that uses AWS' DynamoDB
      • cybojenix
        isn't that their document based NoSQL?
      • hylje
        vendor lock-in as a service
      • cybojenix
        woot
      • pundurs
        haha
      • FunkyBob
        more or less, yeah
      • and yeah, given it's a "serverless" app... locked in [for now]
      • Xpl01t3r joined the channel
      • Xpl01t3r has quit
      • pundurs
        what's the arguably best open source document store? about to give couchdb a shot since rethinkdb is dead.
      • FunkyBob
        I hear good things about couch... I keep wanting to spend more time with ArangoDB
      • but "best" ... well.. what's your use case?
      • flobin joined the channel
      • pundurs
        super simple personal image upload/hosting. i could probably just use a standard rmdb but i keep looking for reasons to look into nosql data stores and this is the best i've come up with so far
      • jas02 has quit
      • SamSagaZ has quit
      • FunkyBob mutters about the abuse of the term "nosql"
      • so it's not a use case, this is rather "forcing it in"
      • FunkyBob
        pundurs: interestingly, I was going to make something like that
      • image upload/transform sort of thing
      • pundurs
        hmm, i see.
      • hylje
        instagram killer
      • FunkyBob
        well, transform, at least
      • most of the work was designing config/auth/monetising things
      • cybojenix
        I see things working in document db's, but then as soon as I expand on it, it just works better with true relations
      • FunkyBob
        yep
      • ah, to have a truely RDBMS
      • jas02 joined the channel
      • anyway
      • Koterpillar joined the channel
      • grafa has quit
      • Koterpillar has quit
      • cybojenix
        FunkyBob, read up on neo4j?
      • phiofx has quit
      • keimlink joined the channel