Re: Regarding to suggestion for registration page

2019-08-21 Thread Sipum
Can u plz tell what you have done so we can learn also. On Thu, 22 Aug, 2019, 11:16 AM RONAK JAIN, wrote: > Thank you so much all of you for your kind of help. > > > I have done this Task. > > > Thanks > > > > > > On Thu, Aug 22, 2019 at 10:21 AM Sipum wrote: > >> Hey Ronak, >> >> At first u

Re: Regarding to suggestion for registration page

2019-08-21 Thread RONAK JAIN
Thank you so much all of you for your kind of help. I have done this Task. Thanks On Thu, Aug 22, 2019 at 10:21 AM Sipum wrote: > Hey Ronak, > > At first u did wrong in import. > > Do as below and compare what u have done. > > From django.contrib.auth.models import User > From

Re: Retrieving data from multiple tables

2019-08-21 Thread Suraj Thapa FC
Yes it has Can you write the query for the above question asked On Wed, 21 Aug, 2019, 10:51 PM 'Amitesh Sahay' via Django users, < django-users@googlegroups.com> wrote: > I am not much of a database guy. But if you wish to get something from > different table, then there has to be some

Re: JWT Token

2019-08-21 Thread Suraj Thapa FC
token = request. Meta['HTTP_AUTHORIZATION'] data = {'token' : token} payload_decoded = jwt.decode(token, settings.SECRET_KEY) try: valid_data = VerifyJSONWebTokenSerilaizer().validate(data) user = valid_data['user'] self.request.user = user except: pass On Thu, 22 Aug,

Re: Regarding to suggestion for registration page

2019-08-21 Thread Sipum
Hey Ronak, At first u did wrong in import. Do as below and compare what u have done. >From django.contrib.auth.models import User >From django.contrib import auth Then when u are creating user do as- user = User.objects.create_user(uanme,pwd,email) THEN for login after sign up use as below -

3D Object Interaction

2019-08-21 Thread Lim Kai Wey
Greetings, I would like to ask if anyone has a suggested way for creating a 3D object which can be interacted with on Django. Any suggestions are welcomed. Thanks in advance. Regards, Kai Wey -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: UI for python windows applications

2019-08-21 Thread Anish Chapagain
Have you tried Gooey https://pypi.org/project/Gooey/ , PyQt https://pypi.org/project/PyQt5/ On Wed, 21 Aug 2019 at 23:31, ARAVIND BALAKRISHNAN < aravindbalan...@gmail.com> wrote: > Can anyone suggest me any modern UIs for python application in windows > other than electron > > -- > You

Re: Regarding to suggestion for registration page

2019-08-21 Thread 'Gaurav Ravindra Bole' via Django users
in register method add user.set_password = request.POST.get('password') before user.save() On Wed, Aug 21, 2019 at 10:56 PM 'Amitesh Sahay' via Django users < django-users@googlegroups.com> wrote: > I guess you have forgotten to mention the APP name under which the pages > are created. Please

Re: JWT Token

2019-08-21 Thread Mohammad Kokhaee
I get that clearly But how to get the Response Sorry I'm new On Thu, Aug 22, 2019, 4:37 AM Ronit Mishra wrote: > You woulld be having some api/profile endpoint, in your project where user > details would be available. Send a post request with access token just like > I explained in the previous

Re: JWT Token

2019-08-21 Thread Ronit Mishra
You woulld be having some api/profile endpoint, in your project where user details would be available. Send a post request with access token just like I explained in the previous email and you should get the response with profile details. On Thu, Aug 22, 2019 at 5:13 AM Mohammad Kokhaee wrote:

Re: JWT Token

2019-08-21 Thread Mohammad Kokhaee
Thanks for your explanation After the user send the token to server What Should I do with the token to access to user id and user name and etc . This is project is mostly like blog web and when the user authenticate API returns just post of this user . I don't know how to reach user information

Re: JWT Token

2019-08-21 Thread Ronit Mishra
Hi, First step is to authenticate and obtain the token. For instance, lets say your endpoint is /api/token, so it'll only accepts POST requests. >> post http://127.0.0.1:8000/api/token/ username=mohammad password=123 You can use cURL, or HTTPie or Python's requests module to test this.. Heck

JWT Token

2019-08-21 Thread Mohammad Kokhaee
Hello guys I've created token by JWT and My questions 1-how to access to user information by token ? 2-Is that the Right way and is that secure? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Best DRF Cheatsheet?

2019-08-21 Thread Jani Tiainen
Hi. Wouldn't it be much better to improve DRF documentation itself rather than create yet an another documentation that you have to maintain? ke 21. elok. 2019 klo 19.58 Charles Thayer kirjoitti: > I've been using Django with DRF off and on for probably over 5 years now. > There are still

Looking for Django registration API

2019-08-21 Thread Sandip Nath
Are there any ready to use user authentication API for Django where user can register not only with username, password and email but also with date of birth, profile-url, picture etc? -- You received this message because you are subscribed to the Google Groups "Django users" group. To

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

UI for python windows applications

2019-08-21 Thread ARAVIND BALAKRISHNAN
Can anyone suggest me any modern UIs for python application in windows other than electron -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: Regarding to suggestion for registration page

2019-08-21 Thread 'Amitesh Sahay' via Django users
I guess you have forgotten to mention the APP name under which the pages are created. Please cross-verify on my observation . Regards, Amitesh Sahay91-750 797 8619 On Wednesday, 21 August, 2019, 12:35:28 pm IST, RONAK JAIN wrote: Hey I tried but still getting like that... Attached

Re: Retrieving data from multiple tables

2019-08-21 Thread 'Amitesh Sahay' via Django users
I am not much of a database guy. But if you wish to get something from different table, then there has to be some foreignkey there I guess your "courses" table should have CID as foreignkey. May be I am wrong.  On Wednesday, 21 August, 2019, 08:26:52 pm IST, Suraj Thapa FC wrote:

Re: Problem with SQLite and migrations

2019-08-21 Thread 'Amitesh Sahay' via Django users
Generally SqlLite is enough for any testing. However, if you are planning to test it with par the other regular DBs, then do not do it. I have seen your GIT-HUB code. Use postgres, you will be happy . On Wednesday, 21 August, 2019, 10:12:38 pm IST, Jonathan Mrutu wrote: Hi Jaemin,

Best DRF Cheatsheet?

2019-08-21 Thread Charles Thayer
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 annoying details well, like read_only vs write_only vs required, and nesting serializers,

Re: Problem with SQLite and migrations

2019-08-21 Thread Jonathan Mrutu
Hi Jaemin, You can try to post this question on stack overflow, but why don't you use PostgreSQL this is recommended. SQLite as the name implies it's more for testing purpose in a small project environment. //Jona

Re: DRF with Rich Text

2019-08-21 Thread Jonathan Mrutu
You must secure your endpoints with authentication mechanism and on top of that you might consider using django-rest-knox //Jona On Wed, Aug 21, 2019 at 5:57 PM Yoo wrote: > Hi, > Thanks for the prompt response (and sorry for such a late one). I suppose > I'm simply asking about JSON in

Re: DRF with Rich Text

2019-08-21 Thread Yoo
Hi, Thanks for the prompt response (and sorry for such a late one). I suppose I'm simply asking about JSON in general and DRF validation. Using the general serializer (serializer.Serializers), DRF validates the JSON itself, right? So, if some malicious person sent Python code via the JSON using

Re: Retrieving data from multiple tables

2019-08-21 Thread Suraj Thapa FC
Thanks... On Wed, 21 Aug, 2019, 6:24 PM Sundararajan Seshadri, wrote: > What you need to appreciate is that the foreign key field gives you the > full record (corresponding to the foreign key). > > So, if you fetch all records as course_rating.objects.all() then c.cid > will also be an object

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
What is the Transaction class which your model inherits from ? Is it just a base model ? Let’s do an experiment Print(“object created”) right after the create() method Print(“callback requested”) on top of your callback method Which one do you see first ? Sent from my iPhone > On 21 Aug

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

2019-08-21 Thread Ahmed Shahwan
That's the class, nothing different other than HTTP requests class CashPayment(BasePayment): """Cash Payment Wrapper Class""" integration_id = CASH_INTEGRATION_ID def __init__(self, amount_cents: int, billing_data: dict): super().__init__(amount_cents, billing_data) def pay_request(self):

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

2019-08-21 Thread Ahmed Shahwan
the response to my callback quicker than saving the object?! it's highly unlikely! there's something else I don't understand. The step that `pay_request()` is the last before getting the response from XPAY's server. I tried to put it after saving the transaction object. same error occurred! I

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 create() >

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
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 create() call. Since you are sure that you are fetching the data properly we can rule out this possibility Its probably a race condition of the callback

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

2019-08-21 Thread Ahmed Shahwan
I tried, same happened. it's related to how Postgres 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

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

Re: Retrieving data from multiple tables

2019-08-21 Thread Sundararajan Seshadri
What you need to appreciate is that the foreign key field gives you the full record (corresponding to the foreign key). So, if you fetch all records as course_rating.objects.all() then c.cid will also be an object giving you the corresponding foreign key record. So, you can access c.cid.cid

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

2019-08-21 Thread Ahmed Shahwan
Transaction model: class WeacceptTransaction(Transaction): """Weaccept's Transaction model""" # before frontend interaction auth_token = models.TextField() # got from step 1 order_id = models.IntegerField(verbose_name="Accept's Order ID") # id from step 2 order_url =

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

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

2019-08-21 Thread Ahmed Shahwan
Hi, I have a very strange problem that I don't know why it happens. I'm creating a REST API service that wraps another REST API payment service, let's call the other services XPAY. It has various payment options (Card, eWallet, Kiosk, and Cash). The steps required to use the services (to make

Problem with SQLite and migrations

2019-08-21 Thread Jaemin Noh
Hello. My application is currently in a development state, so it's using SQLite as a database backend at the moment. Due to the bad design decisions, my application has a migration with raw CREATE VIEW statements and unmanaged models. These VIEWs refer other tables with JOIN clauses. The

Retrieving data from multiple tables

2019-08-21 Thread Suraj Thapa FC
This is my model class courses(models.Model): cid = models.UUIDField(default=uuid.uuid4, editable=True, primary_key=True) course_title = models.CharField(max_length=255, default="") class course_rating(models.Model): cr_id = models.BigAutoField(primary_key=True) cid =

Rest Franework

2019-08-21 Thread Soumen Khatua
Hi Folks, I want to implemnet something like if user type any query parameter then matched string should come first then if the typed words contains in between records then short length of string should come second and so on,as an example: *http://127.0.0.1:8000/get/search/?word=the

Re: Regarding to suggestion for registration page

2019-08-21 Thread Tosin Ayoola
Using httpRedirect to d view 4 the URL u want user to b redirected to On Aug 21, 2019 06:21, "RONAK JAIN" wrote: > I am trying to redirect my registration page but, I am not getting *please > check my attached screenshot* and please let me know where I am doing > wrong... > > > > On Tue, Aug