Re: media file upload

2019-09-18 Thread mohammed habib
Make sure to add ‘enctype="multipart/form-data"’ to your form tag, so that the file data is included in when the form is submitted https://stackoverflow.com/questions/4526273/what-does-enctype-multipart-form-data-mean Sent from my iPhone > On 18 Sep 2019, at 17:38, Luca Bertolotti wrote: > >

Re: Staticfiles on S3

2019-09-04 Thread mohammed habib
Did you run python manage.py collectstatic Are you using static template tags to heed your html link href fields Sent from my iPhone > On 4 Sep 2019, at 23:06, Elias Coutinho wrote: > > Guys good afternoon, > > I managed to put my static folder in s3, the problem is that my effects >

Re: Best DRF Cheatsheet?

2019-08-21 Thread mohammed habib
Maybe we should make one > On 21 Aug 2019, at 19:58, Charles Thayer wrote: > > I've been using Django with DRF off and on for probably over 5 years now. > There are still parts that I'm always needing to look up and review. Anyone > know of a one-pager cheatsheet that covers all the

Re: Weird Database behavior (Can't access object from a view after directly saving it from inside another view)

2019-08-21 Thread mohammed habib
S objects... later >>>>>> t_obj = request.data.get("obj") # transaction object >>>>>> incoming_hmac = request.query_params.get("hmac") >>>>>> calculated_hmac = utils.calculate_hmac_transaction(t_obj) >&g

Re: Weird Database behavior (Can't access object from a view after directly saving it from inside another view)

2019-08-21 Thread mohammed habib
Are you sure the callback request passes the right parameters ? Could you share some of your views code from the 6 steps, and your Transaction model ? Sent from my iPhone > On 21 Aug 2019, at 14:46, Ahmed Shahwan wrote: > > Hi, > > I have a very strange problem that I don't know why it

Re: OT: Exceptions in production. Local variables?

2019-08-15 Thread mohammed habib
Definitely Sentry, they will show you the stack trace and a dump of local variables for every crash, as well as other useful analytics It’s pretty easy to set up If your site is not so busy they have a free plan Sent from my iPhone > On 15 Aug 2019, at 11:18, guettli wrote: > > This is a

Re: Reach the server

2019-07-16 Thread mohammed habib
maps to port 8000 on > the host virtualbox? > > > > >> On Tue, Jul 16, 2019 at 12:48 PM mohammed habib wrote: >> You also need to make sure that your port 8000 from the guest virtualbox >> maps to port 8000 on your host virtualbox >> >> Sent from

Re: Reach the server

2019-07-16 Thread mohammed habib
You also need to make sure that your port 8000 from the guest virtualbox maps to port 8000 on your host virtualbox Sent from my iPhone > On 15 Jul 2019, at 23:34, CHENXIN YANG wrote: > > I created the new Django project on a vagrant virtual box, but I had trouble > reaching the server at

Re: Reach the server

2019-07-16 Thread mohammed habib
To expose your server to external hosts try running: Python manage.py runserver 0.0.0.0:8000 Sent from my iPhone > On 15 Jul 2019, at 23:34, CHENXIN YANG wrote: > > I created the new Django project on a vagrant virtual box, but I had trouble > reaching the server at http://127.0.0.1:8000/