Re: Page 404 - No Job matches the given query.

2019-09-07 Thread Mclaren Sunday
What are you trying to do? On Sat, 7 Sep 2019 20:30 Kean, wrote: > Hi, > > New to Django, Have an issue. the table exists and the view references the > table however, I still get 404 message. > I have spent 8 hours trying to resolve, nothing seems to work, please help? > > urls.py > >

Re: how to pass user input into raw sql query ?

2019-09-07 Thread Mario R. Osorio
*Do not use string interpolation* as proposed by Bhoopesh!!! Take a look at: - SQL injection - SQL injection protection

Any Pypi Library to generate Different Reports on Connected models as well.as Different Graph Generation

2019-09-07 Thread Balaji Shetty
Hi everyone Can any one of you please tell me is there Any Pypi Library to generate Different Reports on Connected models as well.as Different Graph Generation. I want to apply aggregate function like sum, count, avg, group by, having, inner and outer join. I want to generate in Django admin

Re: User matching query does not exist.

2019-09-07 Thread Gabriel Stone
Tamam all the best On Sat, Sep 7, 2019 at 23:12 göktürk sığırtmaç wrote: > I solved it!!! using ObjectDoesNotExist via javatpoint. ( > https://www.javatpoint.com/django-exceptions) > > try: > user = User.objects.get(email=email) > except ObjectDoesNotExist: > user = None; > > > 7 Eylül

Re: User matching query does not exist.

2019-09-07 Thread göktürk sığırtmaç
I solved it!!! using ObjectDoesNotExist via javatpoint. ( https://www.javatpoint.com/django-exceptions) try: user = User.objects.get(email=email) except ObjectDoesNotExist: user = None; 7 Eylül 2019 Cumartesi 23:36:00 UTC+3 tarihinde göktürk sığırtmaç yazdı: > > I'm trying get user

Re: User matching query does not exist.

2019-09-07 Thread göktürk sığırtmaç
Yes i get name email password in register, i get email and password in login 7 Eylül 2019 Cumartesi 23:47:41 UTC+3 tarihinde Gabriel Stone yazdı: > > In your user creation form did you add an email field?if you did then only > can you query users by their email > > On Sat, Sep 7, 2019 at

Re: User matching query does not exist.

2019-09-07 Thread Gabriel Stone
In your user creation form did you add an email field?if you did then only can you query users by their email On Sat, Sep 7, 2019 at 22:36 göktürk sığırtmaç wrote: > I'm trying get user according to email. > > user = User.objects.get(email=email) > > > if user is none, i will show message. I

User matching query does not exist.

2019-09-07 Thread göktürk sığırtmaç
I'm trying get user according to email. user = User.objects.get(email=email) if user is none, i will show message. I will check password after. But when i trying login with wrong email address for test i have error "User matching query does not exist.". How can i handle this error to convert

Page 404 - No Job matches the given query.

2019-09-07 Thread Kean
Hi, New to Django, Have an issue. the table exists and the view references the table however, I still get 404 message. I have spent 8 hours trying to resolve, nothing seems to work, please help? urls.py path('businesslogin/businessadmin/busproject', views.project_detail,

Re: how to pass user input into raw sql query ?

2019-09-07 Thread David Grant
On Sat., Sep. 7, 2019, 8:21 a.m. Daniel Roseman, wrote: > On Friday, 6 September 2019 20:39:58 UTC+1, Bhoopesh sisoudiya wrote: >> >> Hi Lev dev, >> >> Write your query like this >> >> >> sqlRawQuery = "Your query ... Field name= {}".format (userInput) >> >> Thanks >> Bhoopesh Kumar >> >> >>>

Re: Role Based Access Control for different API methods in Django REST Framework

2019-09-07 Thread gulo loki
in your viewset class,you could rewrite get_permissions to set which permissions you want on action def get_permissions(self, *args, **kwargs): if self.action == 'create': self.permission_classes = (AllowAny,) elif self .action == 'login':

Error 'CreateView is missing a QuerySet'

2019-09-07 Thread Febvre Antoine
Hi everyone, I'm trying to get an account app with custom authentification and registration. Admin user can access to django admin site, simple user with required permission can add new users through a CreateView and a form. But, I get this quite annoying error message which tell me

404 error

2019-09-07 Thread arpit Dubey
I have followed all the steps for creating our first app polls but it is showing the error of 404 could you please help me to finding it out why it is happening there after copying each and every step from documentation. -- You received this message because you are subscribed to the Google

Role Based Access Control for different API methods in Django REST Framework

2019-09-07 Thread Azar Mohamed
I am creating REST API for Product, which has following Permission, (create_product, view_product, edit_product). In my Project I am having various users with different roles (Ex: Producer, Retailer, Consumer,...etc). I am assigning permission to individual Roles. I am using Django Group

Re: how to pass user input into raw sql query ?

2019-09-07 Thread Daniel Roseman
On Friday, 6 September 2019 20:39:58 UTC+1, Bhoopesh sisoudiya wrote: > > Hi Lev dev, > > Write your query like this > > > sqlRawQuery = "Your query ... Field name= {}".format (userInput) > > Thanks > Bhoopesh Kumar > > >> >> No. Do **not** do this, ever. Use SQL parameters: query =

Re: django.db.utils.OperationalError: no such table:

2019-09-07 Thread Suraj Thapa FC
1. python manage.py migrate - - run-syncdb On Sat, 7 Sep, 2019, 6:30 PM Arnav Rastogi, wrote: > 1. i remove the db.sqlite file and pycache > > 2. re run the makemigrations and migrate command > > > -- > You received this message because you are subscribed to the Google Groups > "Django users"

django.db.utils.OperationalError: no such table:

2019-09-07 Thread Arnav Rastogi
1. i remove the db.sqlite file and pycache 2. re run the makemigrations and migrate command -- 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: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-07 Thread Kean
Hi, removing did, not work, still getting same error. Welcome any other help from the wider community in reference to this issue. best, Kean On 6 Sep 2019, at 22:26, Bhoopesh sisoudiya wrote: > Try after removing related_name='expenses' from Expenses model. > > On Sat, Sep 7, 2019, 2:28 AM