#django

/

      • djinja
        jtiai: being?
      • jtiai
        djinja: That has totally different query syntax but it has nice translator for django models. I just don't remember the name.. ;)
      • brts has quit
      • djinja
        :)
      • jtiai
      • belak has left the channel
      • brts joined the channel
      • derfenix joined the channel
      • beancurd joined the channel
      • dnikolai joined the channel
      • eVRiAL joined the channel
      • Sweetman has quit
      • eVRiAL has quit
      • atlasloewenherz joined the channel
      • FunkyBob
        jtiai: peewee is an impressive tool
      • lucmult has quit
      • to have managed so many features in such a small package
      • jtiai
        FunkyBob: Haven't used it (yet) since it doesn't support my beloved Oracle :)
      • jolly__ joined the channel
      • bytewise joined the channel
      • FunkyBob
        heh
      • connor_goodwolf yawns
      • atlasloewenherz has quit
      • xaviern joined the channel
      • woogle joined the channel
      • bytewise has quit
      • FinalAngel joined the channel
      • abarax has quit
      • k_sze[work] joined the channel
      • esauro joined the channel
      • stickperson has quit
      • Natsu- joined the channel
      • bytewise joined the channel
      • estebistec has quit
      • Gambit-
        Is there an Encrypt function similar to the Signer utility class?
      • ghostlines joined the channel
      • Unifox joined the channel
      • echevemaster has quit
      • viwal_ joined the channel
      • shashank_ has quit
      • Itkovian joined the channel
      • amigo joined the channel
      • hrrand joined the channel
      • abarax joined the channel
      • ThomasC joined the channel
      • EstebanVelour joined the channel
      • jrm2k6 joined the channel
      • Djankie
        If I want the user to query the database, is that a POST request or GET request?
      • keimlink joined the channel
      • bryantp has quit
      • benoitbb joined the channel
      • amigo has quit
      • tapia joined the channel
      • PoliticsII
        Djankie, if you aren't updating, deleting, or saving new records to your database, then a GET is fine.
      • Djankie
        But then why is login a post method?
      • Im not altering the database with login
      • amigo joined the channel
      • Gambit-
        Djankie, because a post also hides the credentials from the url, which keeps them out of the history.
      • also, a post is used when the browser is supplying information.
      • A get is used when the browser is retrieving a record.
      • afk
      • tapia
        hi. When I print a date in a template, it prints "April 30, 2014", but I need "04/30/2014"
      • PoliticsII
        Djankie: A login creates a session record.
      • Or updates one.
      • Itkovian has quit
      • voidus joined the channel
      • voidus is now known as void
      • Gambit-
        PoliticsII, only in django, and only if you're using that backend.
      • ChrisMorgan
        tapia: argh! resist the madness that is MM/DD/YYYY!
      • tapia
        I've seen that I can define DATE_FORMAT in settings, but if I set USE_L10N (which I do), it is overwriten by the locale
      • PoliticsII
        What do you mean, only in Django? The point is that it changes the state of the server.
      • Gambit-
        YYYY/MM/DD ftw, or DD/MM/YYYY. Stupid american format.
      • tapia
        ChrisMorgan: I actually need SHORT_DATE_FORMAT :-)
      • dlman joined the channel
      • sayan joined the channel
      • PoliticsII
        That's why it requires a POST.
      • Gambit-
        PoliticsII, only in django.
      • PoliticsII
        You've provided exactly zero additional information.
      • Gambit-
        PoliticsII, other systems might use a strictly cookie based session model.
      • cramm joined the channel
      • tapia
        how can I make SHORT_DATE_FORMAT the default, instead the format defined by the locale?
      • Djankie
        Gambit-, ok, but quering the database from the client side, i.e., the user provides two dates in which he wants the records for: the user is suppling information, is that a POST of a GET ?
      • arietis has quit
      • Pikajew
        hi django folks
      • Gambit-
        Djankie, it's a GET.
      • PoliticsII
        How is that relevant? The question is simply why a login requires a POST.
      • Gambit-
        PoliticsII, My point is just that it has more to do with the browser history than writing to the database.
      • onizo has quit
      • ChrisMorgan
        (MM/DD/YYYY is a stupid, stupid, stupid date format that makes no sense in any way. The USA is the only significant country that uses it: https://en.wikipedia.org/wiki/Date_format_by_co... .)
      • Gambit-
        anyways, bed.
      • jtiai
        PoliticsII: Actually login modifies data.
      • PoliticsII
        Yes, that's my point!
      • jtiai
        PoliticsII: it changes contents of the session, probably database for last login info and such.
      • Pikajew
        i'm implementing i18n in my project, this works except for the language chooser provided by the docs
      • PoliticsII
        That is exactly my point, jtiai. It wasn't me who was asking the question.
      • Pikajew
        my urls.py: https://dpaste.de/ctKy anf the template: https://dpaste.de/yY4z
      • furoido joined the channel
      • jtiai
        PoliticsII: Ah, it was Djankie... Missed by a row. :)
      • Pikajew
        do i miss anything? if i click on go i will be redirected to the current page, but not in the other language
      • Djankie
        jtiai, PoliticsII thx, that clarifies it for me :)
      • greg_f joined the channel
      • omarek
        ChrisMorgan: why stupid ? Causes problems with URLs ?
      • arietis joined the channel
      • dlman has quit
      • ChrisMorgan
        omarek: month, then day, then year? A lexicographic ordering must then take the third, then the first, then the second.
      • furoido has quit
      • omarek: D/M/YY has some sense, YYYY-MM-DD has some sense, but muddling the order together is simply crazy.
      • omarek
        ChrisMorgan: I agree, I don't like that part. In Poland, "12.V.2011" is a popular format.
      • bee_keeper joined the channel
      • kezabelle joined the channel
      • ChrisMorgan could talk about the way Americans use season names when speaking of when things will happen, too, not considering that the earth has two hemispheres and that not everyone is in the USA
      • tapia
        the format is not my question :-) I use SHORT_DATE_FORMAT
      • cramm has quit
      • but if I print just {{ my_form.my_date }}, it's printed as "April 30, 2014"
      • chrismed joined the channel
      • and I need it to be printed as SHORT_DATE_FORMAT
      • omarek
        ChrisMorgan: the American format fits well with the crap that is feet and inches.
      • ChrisMorgan
        Oh for a dozenal system :P
      • omarek
        Actually... 'dozens' are not bad. It's a natural system.
      • Base 12 comes from fingers of your hand, like base 10.
      • kezabelle
        tapia: use the date filter?
      • Pikajew
        how can i write something like this?
      • kezabelle
        by default, dates without formatting use DATE_FORMAT IIRC)
      • Pikajew
        <img src="{% static 'img/flags/{{ lang.code }}.png' %}"/>
      • omarek
        Base 360 (minutes) probably came from merge of natural bases 5 and 12.
      • kezabelle
        {% static 'img/flags/'|add:lang.code|add:'.png' %} maybe
      • sayan has quit
      • omarek
        jtiai: how do you write those adapters ? You know, for data export.
      • ChrisMorgan would favour a dozenal system, but it would take rather significant effort to switch to and he doesn’t expect it to ever happen
      • With a dozenal system, you can count to 12 using fingers of one hand. Clearly superior!
      • FunkyBob
        5 digits... 0 to 31... clearly binary is superior :P
      • jtiai
        omarek: Simply, you define unified input API that can produce what ever is needed as an output.
      • sayan joined the channel
      • alr1 joined the channel
      • ecret has quit
      • MultiColourPixel joined the channel
      • HowardwLo
        is there a less resource intensive way of checking if a file exists other than default_storage.exists(path/file) ?
      • FunkyBob
        what makes you say that's resource intensive?
      • kezabelle
        no :(
      • HowardwLo
        its slow for me
      • kezabelle
        remote backend perchance?
      • batisteo joined the channel
      • ticketbot has quit
      • Itkovian joined the channel
      • HowardwLo
        remote backend?
      • ticketbot joined the channel
      • kezabelle
        … yes. which storage backend are you using?
      • il joined the channel
      • Auv has quit
      • HowardwLo
        uh……not sure