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

2019-08-23 Thread mohamed habib
(self): >> """Step 4. issue Pay request""" >> payload = { >> "source": {"identifier": "cash", "subtype": "CASH"}, >> "payment_token": self.payment_key_res.get("token"), >

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

2019-08-21 Thread mohamed habib
if you are able to share more code from the `utils.CashPayment` call that may help us On Wed, Aug 21, 2019 at 4:37 PM mohamed habib wrote: > I highly doubt its related to ORM or postgres, the creation of the record > is synchronous so you can be sure that the record exists after the

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

2019-08-21 Thread mohamed habib
es works internally with > the Django-ORM. > > On Wednesday, August 21, 2019 at 3:07:47 PM UTC+2, mohamed habib wrote: >> >> Wild guess in the dark here, as I am unfamiliar with this API. you are >> doing: >> >> `payment.pay_request()` >> >> before cre

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

2019-08-21 Thread mohamed habib
Wild guess in the dark here, as I am unfamiliar with this API. you are doing: `payment.pay_request()` before creating the WeacceptTransaction object. Maybe this line needs to move below: `models.WeAcceptTransaction.objects.create(...)` ? At what point is the callback request triggered ? On We

Django-form tools, saving data between multistep form

2019-08-17 Thread mohamed habib
I asked this question here: https://stackoverflow.com/questions/57514544/django-formtools-saving-data-between-form-steps I'm trying to create a multistage form using django-formtools . My problem is that I am not sure why my data is not persisting bet

Re: Nested Model Issue

2019-08-10 Thread mohamed habib
You can use a signal to ensure that a profile is created for each user. Make sure all the fields in your Profile model are nullable: ``` class Profile(models.Model): GENDER_CHOICES = ( ('male', 'Male'), ('female', 'Female') ) user = models.ForeignKey(User,on_delete=models.

Re: can anyone help me to solve the following error in django-vue integration

2019-08-02 Thread mohamed habib
I suspect its a syntax error in your webpack.conf.js file. Can you show us the entire webpack.conf.js file please. paste it somewhere like pastebin and link us to it On Fri, Aug 2, 2019 at 7:28 PM Pradeep Singh wrote: > Yes but same error are occur > > > On Fri, Aug 2, 2019, 9:47 PM Sam W wrote

Re: angular or vue js

2019-07-16 Thread mohamed habib
They both will play well with Django because all you need to do is expose a REST API using something like DjangoRestFramework, and you use Vue/Angular to consume this API and display content to the user. On Tue, Jul 16, 2019 at 11:32 AM Pradeep Singh wrote: > which framework is good with django