How to start new web app in Spyder IDE using Django REST framework

Question:

This may be a noob question for some of you to answer, but I’m fairly new to the Anaconda software. I recently downloaded the django REST framework (version 3.1.3) I’m trying to develop a web app with the framework in Spyder IDE but I’m not exactly sure how to start it. I read the framework documentation at http://www.django-rest-framework.org/tutorial/quickstart/ but it’s kind of vague. I want to know how exactly I can start the new app “quickstart“.

Asked By: zelmundo

||

Answers:

Django Rest Framework is, in a way, a wrapper over Django that makes building REST services in Django easy.

Regardless of your IDE, it seems like you haven’t got a hang of Django per se.

To start an app quickstart,

  1. Install Python and pip
  2. Install Django using pip: pip install django should do the trick.
  3. Setup a database
  4. Setup your first django app django-admin.py startproject quickstart

This would install Django and a Django app called quickstart. Your best place to start learning Django would be this excellent tutorial: http://www.tangowithdjango.com/book17/

Also, please look at the Django docs, which are very exhaustive: https://docs.djangoproject.com/en/1.7/

Please note, that both the above links are for Django 1.7.

However, if you do know about Django, then you just need to pip install djangorestframework, add it to your INSTALLED_APPS in settings.py and get started.

Answered By: Newtt

Django framework above 3+ version project in Spyder IDE

Follow this steps:

  1. Install python
  2. Execute this command python -m pip install Django
  3. Use this command to confirm Django installed python -m django --version
  4. Create new project, execute django-admin startproject mysite
  5. Go to Spyder IdE, Open Projects -> New Project
  6. Select existing directory in pop-up screen, browse the mysite folder.

Now you can see the Django created and imported in Spyder IDE.

enter image description here

Answered By: Sathiamoorthy

If the command django-admin startproject mysite can be directly run in the Anaconda command terminal.

Alternatively you can run the command in the command prompt of your computer, but you will have to run it in the directory "C:Users…anaconda3Scripts"

The new django project will also get created in the Scripts folder

Answered By: Devarshi Mandal

Press Ctrl+F6 then check ‘command line options’ after that type ‘runserver’ in the box. you must have selected manage.py when pressing run.

Answered By: amir.hooshang
Categories: questions Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.