#django

/

      • michaelfillier
        well, Drupal does serve it's purpose and it may be the right tool for some sites, but the sites that I developed on Drupal usually require me to work and think the "Drupal Way", whereas Django seems to work for you.
      • is_null
        hi all, is it normal that django's EmailField is case sensitive ? this is weird
      • brpacecar joined the channel
      • estebistec|work joined the channel
      • michaelfillier
        fcgi is what is available on my server, site5
      • superdmp
        is_null: some email software is case sensitive
      • chuckharmston joined the channel
      • is_null
        that's not standard
      • michaelfillier
        what host do you use to deploy?
      • is_null
        michaelfillier: i use uwsgi on my servers but i like pythonanywhere.com
      • superdmp
        is_null: maybe not, but some email software is case-sensitive, so...
      • megamark16 has quit
      • megamark16 joined the channel
      • megamark16 has quit
      • is_null
        supporting broken software is broken by definition
      • maybe you're talking about something like outlook express '97
      • chuckhar_ has quit
      • void joined the channel
      • superdmp
        "The local-part of a mailbox MUST BE treated as case sensitive. Therefore, SMTP implementations MUST take care to preserve the case of mailbox local-parts" - rfc2821
      • is_null: looks like it is part of the standard
      • is_null
        could you provide an example ?
      • michaelfillier
        wow pythonanywhere.com looks great, do you host your static and media files with them too, or use a cdn?
      • Deathvalley122 has quit
      • foundatron has quit
      • gmcabrita has quit
      • gmcabrita joined the channel
      • shredding has quit
      • phildini joined the channel
      • joshfinnie has quit
      • ender979 joined the channel
      • phuzion_ joined the channel
      • SouravAJ has quit
      • apollo13
        michaelfillier: I don't know anybody using pythonanywhere, sry
      • joshfinnie joined the channel
      • mmalone joined the channel
      • pjs has quit
      • phuzion has quit
      • dpn` has quit
      • alesdotio has quit
      • kenbolton has quit
      • LoganLK has quit
      • dpn` joined the channel
      • is_null has quit
      • superdmp
        is_null: an example of what? the RFC says that the local part (before the @ sign in other words) must be treated as case-sensitive - I don't see what else there is to say
      • kenbolton joined the channel
      • apollo13
        the rfc also allows comments in email adresses
      • superdmp
        what? I want a comment in mine!
      • Deathvalley122 joined the channel
      • LoganLK joined the channel
      • oh
      • apollo13
        superdmp: you can actually encode the whole mail body in the email address
      • napperjabber has quit
      • superdmp
        did you just mean commas apollo13?
      • apollo13
        probably no mta will like that
      • no comments
      • zatan has quit
      • superdmp
        cool!
      • explodes joined the channel
      • apollo13
        no so cool :þ
      • fle has quit
      • Joestar79 has quit
      • aezell has quit
      • mike007 joined the channel
      • dav__ is now known as dav
      • mgrouchy has quit
      • dalazx joined the channel
      • chrisramon joined the channel
      • mgrouchy joined the channel
      • etcetera joined the channel
      • lobo_d_b joined the channel
      • Sembei has quit
      • etcetera has quit
      • etcetera joined the channel
      • eraldo joined the channel
      • zeropoint is now known as zeropoint|away
      • eraldo
        Are you guys ever renaming the default ".objects"? for models?
      • apollo13
        yes
      • GorillaPatch has quit
      • eraldo
        apollo13: so you end up with something like Entry.entries.all() right?
      • apollo13
        eraldo: I probably wouldn't name it entries and I normally don't do it (unless I have a reason for it)
      • GorillaPatch joined the channel
      • Lauxley
        apollo13: why would you do that ?
      • oh
      • apollo13
        like Entry.published.all() which would prefilter to published articles
      • Lauxley
        yeah sometimes its necessary
      • but he meant the default manager
      • apollo13
        neccessary not really, but it's nice sometimes imo
      • eraldo
        apollo13: hm.. I did rename them like that and now I have troubles due to my code not being very generic (refacturing)
      • apollo13
        eraldo: hehe, yeah, don't rename it unless you have a actual reason
      • eraldo
        apollo13: Would you be so kind as to enlighten me with some cases where you do or why (roughly)
      • apollo13
        eraldo: well eg if I add a new manager which prefilters entries to only show published ones
      • eraldo
        apollo13: > Entry.published.all() ?
      • a2on has quit
      • apollo13
        eraldo: for instance yes
      • pydanny has quit
      • jprobst joined the channel
      • eraldo
        apollo13: ..hm I wrote one manager ("EntriesManager": .entries) ..having two methods .all() .owned() and .assigned() ..but that forces me to substitute every .object with .entries which is confusing.
      • apollo13: can I instead extend the .objects Manager to include .objects.owned() ..etc?
      • apollo13
        eraldo: yes
      • mykul has quit
      • just extend your manager and do objects = MyManager()
      • eraldo
        apollo13: sounds better.. thank you. :)
      • nanonyme
        hmm, what does Django's staticfile sender actually do, btw? does it read&chunk&write or what?
      • BANANAJAM is now known as Optimus
      • Lauxley has quit
      • Optimus is now known as BANANAJAM
      • jprobst has left the channel
      • a2on joined the channel
      • greg_f has quit
      • apollo13
        nanonyme: well it uses django's streaming stuff in 1.5, but not chunked
      • nanonyme
        hmm
      • tWoolie has quit
      • apollo13, I kinda meant chunked as in it's not read completely to memory but written chunk by chunk
      • apollo13
        nanonyme: according to the sourcecode yes ;)
      • nanonyme
        if not, I probably should just write my own view if I want Django to handle static files on Heroku
      • apollo13
        nanonyme: why don't you just look at the source or believe me :þ
      • nanonyme
        because cell phone is awkward to browse source codes with
      • apollo13
        hihi, then just trust me :þ
      • nanonyme
        so what does streaming imply here?
      • apollo13
        that not the whole file is read into memory
      • btw didn't we have that discussion a few days ago
      • sudobangbang has quit
      • nanonyme
        nope, not quite
      • close to it though
      • apollo13
        haha
      • nanonyme
        that time I found out about StreamingHttpResponse which is pretty neat
      • apollo13
        ;)
      • bwreilly joined the channel
      • brpacecar is now known as betterthanbanana
      • nanonyme
        but you can still feed it input data in multiple ways. smart way would be using the chunk size from io module, me thinks
      • srj55 joined the channel
      • apollo13
        nanonyme: django doesn't care as long as it's iterable
      • betterthanbanana is now known as bananajam3
      • muay-guy has quit
      • srj55
        In my template, I'd like to use the output of {% url myview %} in another tag...is this possible?
      • opi joined the channel
      • corehook has quit
      • apollo13
        srj55: {% url myview as blabla %}
      • nanonyme
        apollo13, yeah but if you want to actually send a *file*, you should at least use disk block size
      • apollo13
        nanonyme: rofl
      • ever heard of diskcaches?
      • the os probably has the whole file in cache before you send a byte ;)
      • I wouldn't care about that at all, unless it actually is a problem
      • srj55
        apollo13, awesome! thanks!
      • nanonyme
        apollo13, most likely not unless it's actually a very tiny file
      • bananajam3 is now known as brpacecar
      • apollo13
        nanonyme: as said, useless optimizations
      • mykul joined the channel
      • hell if you are after performance what are you doing with heroku?
      • nanonyme
        how so?