being a russina born and raised in far north, above the polar circle, I'd really like to come over to Iceland and try some of their dishes... if only to compare them to "our" native stuff
*russian even
Charlie_X has quit
ljosberinn
hehe, give link for native stuff =)
jenner
well, all sorts of raw or dried fish and reindeer meat, although nothing fermented
raydeo
ljosberinn: I personally have no experience with using postgres in a multi-master setup... normally you have 1 master and multiple read-only connections
ljosberinn
well, my db colleague made it a bit different this time =)
raydeo
so "read&write random data" using postgres sounds technically not possible to me without some extra conditions like sharding constraints
ljosberinn
i see... although i don't fully understand :/
i mean, it's not "random" data... it is a proper data, all the way from html frontend =)
raydeo
sure, but does each database have the same schema?
they are redundant?
ljosberinn
nope, they serve for different purposes
uramaget joined the channel
raydeo
so instead of 0, 1, 2, etc what should they be named?
if they are not sharing the same schema then my issues with the multi-master stuff go away
(array kind of implies they all share the same purpose)
ljosberinn
i'm fine with naming... everything is fine with db names... i was just thinking whether is it possible to the first database have a property like "main_psql" or whatevers, so i can later on during the request reference it by that prop...
raydeo
sure
uramaget
hey everyone, i've recently gotten back into web dev. after a few years, and noticed pylons is now pyramid. am i correct in assuming that there is no tmpl_context anymore?
raydeo: i've read a bit on the renderer globals which seem to address my concern, but just wanted to ask around and check if i'm not doing anything stupid x)
Zart
you'd better learn pyramid from scratch. it shares only pastedeploy afafik
raydeo
and webob
Zart
ah, yes
btw, pyramid 1.0 doesnt work with modern webob properly
returns iterator of unicode strings on 2.x
had to downgrade webob for it to work. pyramid 1.1+ is ok
uramaget
D: ah
that's no good
thank you guys, you're the best :)
hvelarde|busy has quit
raydeo
Zart: tiny violin for using something released 6 years ago ;-)
Zart
raydeo, I was trying to write a simple app in multiple frameworks and check how far compat can go
maybe pyramid should provide similar default out-of-the-box, though I dont understand how wrong host header matters much
hvelarde|busy joined the channel
raydeo
typical host headers are sanitized by nginx and we consider it a non-issue from pyramid's perspective
supton has quit
lxcid joined the channel
if you are forwarding all traffic to pyramid without a virtual host in front then it's more of an issue
Zart
they claim that webserver validation turned out not to be enough in docs
raydeo
in nginx you can use the $host variable which is the same as your virtualhost
whereas $http_host is the raw, unsanitized header
Zart
nginx isnt the only option
raydeo
of course
it should be done in middleware
if you need a generic solution
mejymejy joined the channel
evilbungle has quit
Zart
true
lxcid
hi guys, i have a question. I'm using a transaction manager (pyramid_tm) and I like to catch Integrity exception (for case where someone try to register a User with a username that is already taken). Is it possible to catch it so that i can let my form response with the error or this is not recommended
I mean in that case a better solution might be to manually made a query first before adding.
raydeo
lxcid: if you want to handle the error in a form-specific way you may wish to catch it inside your view
you can put a try except around an explicit flush()
lxcid
cool! thanks!
Zart
then transaction.rollback() manually iirc
raydeo
yes
you will need to use transaction.rollback() in the except
wait no
(if you want to recover) then you need to create a sp = transaction.savepoint()
then in except: sp.rollback()
mejymejy has quit
if you don't want to recover then you should just transaction.abort()
raydeo Zart I haven't gone through this experience yet.. what is meant by "let my form response with the error" ? what can a form do with the exception?
raydeo
return the appropriate error for a duplicate record?
supton joined the channel
mejymejy joined the channel
dowwie
:(
raydeo: what's going on from line 7 on
bochecha has quit
the transaction is aborted above, then it looks like the savepoint logic finishes unwinding something
oh shit they're independent scenarios aren't they
raydeo
it's 2 examples, yes
dowwie
you just put them together in the same code
k got it
klkljk joined the channel
_user joined the channel
klkljk has quit
zepolen joined the channel
vyndion joined the channel
vyndion
good evening!
waigani joined the channel
amragaey has quit
veeti joined the channel
zepolen has quit
mejymejy_ joined the channel
mejymejy_ has quit
mejymejy has quit
mejymejy joined the channel
supton has quit
amragaey joined the channel
marcidy joined the channel
supton joined the channel
disko has quit
zepolen joined the channel
npo joined the channel
_user has quit
zepolen has quit
sirn joined the channel
ljosberinn has quit
zepolen joined the channel
mejymejy has quit
uramaget
hello vyndion :)
Lcaracol has quit
zepolen has quit
zepolen joined the channel
mejymejy joined the channel
Spanktar joined the channel
ljosberinn joined the channel
Method__ has quit
zepolen has quit
lxcid has quit
zepolen joined the channel
supton has quit
sawdog
is anyone running nspawn containers instead of Docker containers?