top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to generate SQL query from Django Query ?

0 votes
417 views

Can anyone help me to generate SQL query from Django query

  • Like below:

Employee.objects.all() => select * from employee

posted Oct 15, 2019 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

I'm new to Django. Is there any tell how to add a limit filter in Django?

+1 vote

Hi,

Please, I'm working on a dashboard project and so far I am facing challenges when it comes to writing functions for my views.

The difficulty here is, how do I write functions for different parts on a template.

For instance, I want to write a function that takes a user to his profile. How do I do that?

So far this is what I came up with:

@login_required
def show_profile:
  if request.method ==GET:
   return(render, '/profile.html/')
  else:
   return (render, '/login.html/')
+1 vote

Anyone can explain how to delete or alter existing table in database?

+2 votes

I am trying to learn Django. My initial exercise seems fine. I want to create an API with REST on Django for an interactive Python code. REST framework on Django I am understanding more or less.

I am looking for a simple example to start with. I am using Python 2.7+ on MS-Windows 7 Professional.

If any one may kindly suggest.

+2 votes
(venv)avinash@dell ~/django_projects/usertracking $ python manage.py runserver 113.193.144.56:80
Performing system checks...

System check identified no issues (0 silenced).
December 27, 2014 - 13:12:42
Django version 1.7.1, using settings 'usertracking.settings'
Starting development server at http://113.193.144.56:80/
Quit the server with CONTROL-C.
Error: That IP address can't be assigned-to.
...