#django

/

      • kingarmadillo joined the channel
      • LordVan
        on another note .. using drf to do your data import from a legacy db (with rather different structure,..) is pretty neat
      • yacek19 has quit
      • yacek19 joined the channel
      • Ahuj joined the channel
      • o0 joined the channel
      • Xorg joined the channel
      • FunkyBob
        I can see that
      • KeyJoo has quit
      • mattmcc
        I could, but there's like a whole generation of ETL tools that are probably better suited.
      • shangxiao
        wrestling with drf wouldn't've been my first choice :)
      • but i suppose if you had your 2 apis setup already…
      • audioburn has quit
      • KeyJoo joined the channel
      • ose joined the channel
      • ose
        if I do not want to use i18n and l10n, I can set USE_I18N and USE_L10N to False in my settings. But do I keep or remove 'django.middleware.locale.LocaleMiddleware' and 'django.template.context_processors.i18n'? Can something break if I remove them and some package dependency assumes I have them?
      • mcspud
        shangxiao
      • I move to melb on Thursday
      • Want to get obnoxiously drunk and watch wpd?
      • fleetfox
        ose: all locale middleware does is sets threadlocal for current language and prepends language to url if necessary
      • and i18n adds 3 variables into context
      • vovs03 joined the channel
      • LANGUAGES, LANGUAGE_CODE, LANGUAGE_BIDI
      • unless your 3rd party app explicitly states it wants them it's not likeley to break
      • ose
        alright, thanks
      • LordVan
        shangxiao, well I wanted to have the api on the new system anyway .. so I just wrote an importer using RESTEasy which just accesses the original DB directly ;)
      • kingarmadillo joined the channel
      • ssv_ joined the channel
      • mcspud
        LordVan also have a look at Sandman2
      • LordVan
        mcspud, intresting i might consider that next time, but in this case I just opened a copy of the sqlite3 db and ran a total of like 5 queries
      • mcspud
        sure thing
      • LordVan
        mcspud, also the main issue: the old one was based on twisted+divmod axiom => the DB is a bit .. odd
      • XD
      • so just exposing that whole DB as api would be very confusing
      • mcspud
        haha wut
      • why would someone do that
      • LordVan
        mcspud, for fun let me show you
      • zeus1 has quit
      • Ikoru has quit
      • mcspud, http://dpaste.com/0ZMMT6R <- not really something you want to expose like that as api
      • ;)
      • mcspud
        I like the _v1 annotations
      • Its like semantic verionsing hungarian notation
      • versioning*
      • LordVan
        yes
      • but otherwise the added_at is a datetime type in axiom .. but those numbers are not unixtime so not sure what it is
      • maybe unixtime * 1000 or something so it is integer
      • since i didn't need it i ignored it
      • q--pr joined the channel
      • mcspud, yeah it can/could(?) do versioning of data models
      • but i like django's ORM better
      • that and the web-part of that old system was twisted.nevow
      • mcspud
        Thats not how you version though <_>
      • LordVan
        which afaik is abandoned
      • mcspud, https://github.com/twisted/nevow maybe not abandoned but well way too low level for what I used it for (for today's standards)
      • mcspud
        Yeah reading it now
      • Interesting stuff
      • And by interesting I mean I would never use it
      • But then again, I'd never use an object DB either so meh
      • eribol joined the channel
      • timdiels has left the channel
      • LordVan
        mcspud, ^^ well it all depends on your use case but i find working with the axiom stuff annoying so ..
      • mcspud
        Well, I'm probably too-late in the web dev cycle to have to solve the problems it was designed to solve
      • LordVan
        mcspud, https://github.com/twisted/axiom <- i am pretty sure that is not really in use anymore
      • azulakina has quit