I sent an email that includes a transparent 1x1 pixel png with a source of mysite.com/cookie.png - I set a cookie at that point and return the png file
mayhew joined the channel
pgcd has quit
djapo joined the channel
milardovich joined the channel
DodgeThis joined the channel
MrFantastik joined the channel
hamub has quit
MrFantastik
do any of you intergrate javascript frameworks with your django apps? or do you just use the django templating system?
jhfisc joined the channel
mattmcc
MrFantastik: Depending on which frameworks you mean, there isn't necessarily any integration needed.
milardovich has quit
MrFantastik
i want to learn something like react or angular to make me more hirable im having a hard time finding jobs, i really don't know what the frameworks do though or the advantages of using one
backnforth has quit
other than maybe putting computation load on user instead of the server
peconia has quit
djapo
they make things more api friendly, less page reloads
Gandalfar joined the channel
bradfordli123 has quit
mojtaba
harmaahylje: Yes, I have used it. How should I do that?
What method should I override?
harmaahylje: I have just defined the form_class, template_name and success_url in that view.
Hey guys. Im using a framework that imports 'decorator_include', and I have both django-decorator-include and decorator installed from pip... but I still get 'no module'. I have no idea what I'm missing.
blizz017 has quit
mojtaba has quit
DrYockel has quit
pwrentch has quit
kupi joined the channel
milardovich joined the channel
milardovich has quit
sol1x has quit
tourdownunder joined the channel
backnforth joined the channel
tourdownunder has quit
XofP has quit
foo
[redacted]
[redacted]
tourdownunder joined the channel
bethany7010 has quit
eN_Joy joined the channel
NomadJim_ joined the channel
Donitzo has quit
NomadJim has quit
tourdownunder has quit
ionescu77 joined the channel
mattmcc has quit
Donitzo joined the channel
r29v joined the channel
roomcayz joined the channel
amcm has quit
sphrak_
in what context does one use @property in a model? can I query objects and access a that property?
savid
sphrak_: it works the same way you'd expect it to on any python class
with a @property method, you'll have access to `self`, an instance of the model.
fission6 has quit
Just return whatever value you want
sphrak_
hmm I see, but I couldnt do like x = Model.objects.get(pk=1), then x.property_name? I guess I have some reading to do hehe
milardovich joined the channel
csotelo_at_work has quit
lavalamp has quit
milardovich has quit
MrFantastik has quit
foo
[redacted]
bedspax has quit
Donitzo has quit
Donitzo joined the channel
r29v joined the channel
juiccifer has quit
savid
sphrak_: yes, you can do exactly that.
milardovich joined the channel
sphrak_
thats supercool, thank you savid :)
aussiejames joined the channel
mRWaffles_
Quick design question. When making a restful API is it okay if different methods at the same resource have different schemas?
aussiejames has quit
aussiejames joined the channel
Like a delete request doesn't need data, just an identifier, whereas a POST on the same resource would fail without the required data.
sigurdlj has quit
Donitzo has quit
tobz joined the channel
Donitzo joined the channel
That's a dumb question never mind I am confusing myself
savid
mRWaffles_: not a dumb question, but sounds like you know the answer. Typically a REST resource only requires data during POST/PUT/PATCH operations.
If you're using Django, I'd highly recommend checking out django-rest-framework.
mRWaffles_
Yeah I am slightly familiar with restframework and love it, but now I'm trying to design a serverless api using AWS API Gateway and Lambda
ionescu77 has quit
Donitzo has quit
savid
A noble effort. As a cautionary tale -- I tried that once and regretted it (mainly due to trying to get auth to work). Lambda is pretty cool, though. I at least recommend staying away from Cognito for user auth and just use JWT instead.
foo
[redacted]
foo [redacted]
amcm joined the channel
savid
foo: yes, that would be a keyword argument. But you'd have to override the form class to pass that in, I think. I'm not familiar with django-formtools, though.