#django

/

      • b00tstr4p joined the channel
      • leetrout joined the channel
      • kuter has quit
      • whaack joined the channel
      • pete___ joined the channel
      • govg joined the channel
      • not_a_web_devbot joined the channel
      • not_a_web_devbot has quit
      • not_a_web_devbot joined the channel
      • re1 has quit
      • pete___
        Hey everyone, does anyone use django_storages_redux with AWS?
      • re1 joined the channel
      • lucasxu joined the channel
      • Popzi joined the channel
      • If so, how do you create a folder (aka a key) without providing a file?
      • theseb joined the channel
      • omarek
        Can someone clarify Django Rest Framework to me ? I finished the DRF tutorial, but I haven't used any RESTful API before. It seems that DRF offers a way to return responses in many formats...
      • harmaahylje
        json and xml
      • at least
      • kaakku
        omarek: What would you like clarification on?
      • theseb
        anyone use uwsgi? trying to get it working with nginx....I can get uwsgi working using http but apparently "sockets" and "http" are different so getting confused
      • joh_ joined the channel
      • omarek
        ...including HTML. So how is DRF typically used in a Django website ? Slapped on top of it, added later in addition to classic views, or you build a RESTful application from the start ?
      • I'm leaning towards the latter.
      • joh_
        Hello, how can I set the DateTime-Format in the model at a models.DateTimeField ? There is no form
      • harmaahylje
        omarek: maybe you should study a bit about restful
      • omarek
        kaakku: Is Django Rest Framework meant to be an addition to a Django website, or a replacement of traditional way of doing things ?
      • harmaahylje: How ? Where ?
      • harmaahylje
        perhaps wikipedia for starters?
      • omarek
        harmaahylje: I've read the wikipedia article and done the Django Rest Framework tutorial. I know REST is more than just GET and POST request.
      • kaakku
        omarek: Yeah, do read up on RESTful APIs. It can be an addition to a Django website or / and a completely API driven approach.
      • omarek
        Do you have any specific articles in mind ? I haven't used any web APIs, could you recommend some that are not Facebook ?
      • not_a_web_devbot has quit
      • FeersumEndjinn joined the channel
      • joh_
        Any ideas?
      • kaakku
        joh_: Format as in? Do you want to change the way it is stored in the db?
      • whaack has quit
      • joh_
        kaakku: yes with a different datetimeformat
      • jeanba joined the channel
      • whaack joined the channel
      • marc_v92 has quit
      • not_a_web_devbot joined the channel
      • kaakku
        omarek: I've personally used Twitter APIs and the APIs that I've built myself for my project. So I dunno of any specific articles...
      • maryokhin has quit
      • omarek
        I'm doing a homework project from a past job interview (that I failed because I couldn't write this on time). It's a straightforward CRUD with one foreign key and list / detail views.
      • maryokhin joined the channel
      • Popzi has quit
      • kaakku: The part where Django Rest Framework comes in: the specification asks for 'asynchronous page changes' (pagination), 'for example, using Django Rest Framework'.
      • marc_v92 joined the channel
      • In the light of the above, I think an API-driven approach is better ?
      • whaack has quit
      • hamub has quit
      • joh_
        kaakku: you know if that is possible?
      • djosh joined the channel
      • Qchmqs has quit
      • maryokhin has quit
      • anddam joined the channel
      • kaakku
        joh_: I am not sure. If you're using Django, then passing in a datetime Python object to the model's Datetime field is the way to do it.
      • omarek: If async page changes hints at a single page app, then yes.
      • theseb
        anyone got django+usgi+nginx working?
      • jev_ has quit
      • moldy
        theseb: lots of people
      • kaakku
        usgi? is that uwsgi or wsgi? or something different?
      • joh_: What is the use case though?
      • omarek
        kaakku: Only one of many points in specification mentions 'asynchronous' and 'django rest framework'. So I'm guessing... "no, it doesn't hint" ?
      • joh_
        kaakku: Its for a logging function and the data should be printed out in a table. But the default DateTime-Format doesn't fit into the project
      • kaakku: but django.utils.formats should be enough for printing it with the right format or?
      • royendgel joined the channel
      • not_a_web_devbot has quit
      • theseb
        moldy: kaakku: nginx uses "file sockets" but in django settings.py you only specify http sockets in ALLOWED_HOSTS....how do you bridge those 2?
      • moldy
        theseb: they have basically nothing to do with each other
      • theseb: the values in ALLOWED_HOSTS match the value that the browser sends in the HTTP Host header
      • kaakku
        joh_: Usually I use strptime / strftime for the formate conversions between the string format and datetime object. So... I guess that should suffice.
      • tneva82 has quit
      • omarek: I really don't know what the spec means... :/
      • _mirak_ has left the channel
      • theseb
        moldy: all know is if I want to test my app with "lynx 127.0.0.1:8000" then that socket needs to be in ALLOWED_HOSTS....however..that isn't enough for nginx right?
      • omarek
        kaakku: Something tells me you speak Finnish, not Polish.
      • kaakku
        omarek: Sorry?
      • theseb
        moldy: nginx gets all complicated with extra tweaks to uwsgi you need to make to "glue" it to nginx right?
      • moldy
        theseb: in that case lynx sends "Host: 127.0.0.1", and django checks that value against ALLOWED_HOSTS. nginx doesn't care.
      • thinkt4n_ joined the channel
      • theseb
        moldy: all i'm saying is once i get a uwsgi+django all pretty and debugged you can't just stick nginx in front WITHOUT making mods to the uwsgi+django right?
      • moldy
        theseb: you should be able to
      • theseb: again: the socket that nginx uses to talk to uwsgi has nothing to do with ALLOWED_HOSTS
      • theseb
        moldy: why does nginx make a fuss about "unix sockets" then? i never saw that in django-land...just seems to confuse things for newbs
      • royendgel has quit
      • moldy: ok
      • moldy
        theseb: it doesn't make a fuss. you don't have to use unix sockets. but it's a nice option in some situations.
      • you can just use a tcp port if you prefer that
      • xBBTx
        theseb, there are two ways to do nginx + uwsgi