Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-1626

On-boarding - CyVerse and App Store - Learn about django - do introductory tutorial

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Story Points:
      2
    • Sprint:
      Spring 2019 Sprint 3, Spring 2019 Sprint 4, Spring 2019 Sprint 5, Spring 1 2021 Mar 22 - Apr 2, Spring 2 2021 Apr 5 - Apr 16, Spring 3 2021 Apr 19 - Apr 30, Spring 5 2021 May 17 - May 28

      Description

      We are using Django for development of App Store and CyVerse integration site.

      Before you can contribute, you need to understand some basics of how Django works.

      Django is a full-stack web application framework that uses object-oriented python to manage pages, content, and database. Django is popular and there is a lot of documentation.

      If you are new to Django, a great way to get started is to do the following sections of the tutorial "Writing your first Django App":

      As you do above tutorials, it's useful to think about:

      • How do you modify the database? (models.py)
      • How do you add data to the database? (migrations)
      • How does URL matching and dispatching work?
      • How do you create a new page?
      • How do you create a completely new django site?
      • How do you create a completely new django app for your django site?

      And:

      • What is settings.py?
      • What is manage.py?
      • What is urls.py?
      • What is django-admin?

      Tips & Links:

      • You can install and run Django on Linux, MacOS, or Windows. It's super easy on all platforms!
      • App Store will be deployed on Ubuntu Linux, but you can develop on whichever platform you prefer.
      • Probably you can use whatever database you like for your development environment.
      • Django quick install guide - https://docs.djangoproject.com/en/2.1/intro/install/
      • It is useful to install and run django in a virtual environment. That way, you can install whatever packages you need without fear of contaminating your system python. On many systems this is a major consideration. For instructions, see the section on virtual environments in the "Contributing" tutorial: https://docs.djangoproject.com/en/2.1/intro/contributing/

        Attachments

          Issue Links

            Activity

            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Tips on virtual environment:

            • Create a location to save virtual environments and use activate to launch. For example:

            mkdir ~/.virtualenvs
            python3 -m venv ~/.virtualenvs/djangodev
            source ~/.virtualenvs/djangodev/bin/activate
            (djangodev): pip3 install Django

            • Check install by starting the python interpreter and importing django as in the following example (from a MacOS system):

            (djangodev): python3
            Python 3.7.2 (default, Feb 12 2019, 08:16:38)
            [Clang 10.0.0 (clang-1000.11.45.5)] on darwin
            Type "help", "copyright", "credits" or "license" for more information.
            >>> import django

            Show
            ann.loraine Ann Loraine added a comment - - edited Tips on virtual environment: Create a location to save virtual environments and use activate to launch. For example: mkdir ~/.virtualenvs python3 -m venv ~/.virtualenvs/djangodev source ~/.virtualenvs/djangodev/bin/activate (djangodev): pip3 install Django Check install by starting the python interpreter and importing django as in the following example (from a MacOS system): (djangodev): python3 Python 3.7.2 (default, Feb 12 2019, 08:16:38) [Clang 10.0.0 (clang-1000.11.45.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import django
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Note:

            I had to add this additional line to top-level mysite/urls.py:

            • from django.conf.urls import include

            as per this advice: https://stackoverflow.com/questions/34471102/python-nameerror-name-include-is-not-defined

            Show
            ann.loraine Ann Loraine added a comment - - edited Note: I had to add this additional line to top-level mysite/urls.py: from django.conf.urls import include as per this advice: https://stackoverflow.com/questions/34471102/python-nameerror-name-include-is-not-defined
            Hide
            rpatil14 Riddhi Jagdish Patil (Inactive) added a comment -

            Below are the tutorial links by The Net Ninja for Django and Python which I found useful:
            + Django framework - https://www.youtube.com/watch?v=n-FTlQ7Djqc
            + Python tutorials - https://goo.gl/xD2AvX
            + Course files - https://github.com/iamshaunjp/django-...
            + Django docs - https://docs.djangoproject.com/en/1.11/
            cc. [~aloraine], Narendra Kumar Vankayala, Sai Charan Reddy Vallapureddy, Srishtee Marotkar

            Show
            rpatil14 Riddhi Jagdish Patil (Inactive) added a comment - Below are the tutorial links by The Net Ninja for Django and Python which I found useful: + Django framework - https://www.youtube.com/watch?v=n-FTlQ7Djqc + Python tutorials - https://goo.gl/xD2AvX + Course files - https://github.com/iamshaunjp/django- ... + Django docs - https://docs.djangoproject.com/en/1.11/ cc. [~aloraine] , Narendra Kumar Vankayala , Sai Charan Reddy Vallapureddy , Srishtee Marotkar
            Hide
            Narendra Narendra Kumar Vankayala (Inactive) added a comment -

            Installation on Windows environment:
            1. Install Python 3.x.x ( usually called Python 3) version from https://www.python.org/downloads/
            2. Set the environment variable of python so that we can access python from anywhere through the command line — https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-path
            To Check if python is set as system variable :
            a. Open command line from anywhere
            b. Type python
            If you get the interpreter python is set as a system variable

            • Starting with Python 3.4 "pip" (Python Package Manager) which is useful to install python packages on the fly using command line interface comes with the Python installers by default*
              To check if pip is installed or not (Type pip in the command line after you set the environment variable correctly by following step 2 )
              If you get an error : Follow the instructions given in the link – https://pip.pypa.io/en/stable/installing/

            Setting up the virtual environment is useful to ensure versions of python packages are relevant to our application as python packages are installed across the system.
            Different applications might use different versions of python. To avoid this we will use virtual environment to avoid this ambiguity
            To install the virutal environment in Windows:
            1. pip install virutalenv
            -------------------------------
            To Create a virtual environment:
            1. virtualenv "environmentName"
            Time to activate the virtual environment:
            1. cd environmentName\Scripts\
            2. activate
            You will see the command line environment changed to your "environmentName "

            To install Django in your virtual environment
            1. pip install Django
            To check if Django is installed or not
            Type the following in the command line
            1. python
            You will get the python interpreter Type the following step 2 and 3 in the interpreter
            2. import django
            3. django.VERSION
            If you get the version similar to this (2.1.7, 'final', 0) - You are done

            Move to your working directory and can start working on it with this virtual environment set up

            Show
            Narendra Narendra Kumar Vankayala (Inactive) added a comment - Installation on Windows environment: 1. Install Python 3.x.x ( usually called Python 3) version from https://www.python.org/downloads/ 2. Set the environment variable of python so that we can access python from anywhere through the command line — https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-path To Check if python is set as system variable : a. Open command line from anywhere b. Type python If you get the interpreter python is set as a system variable Starting with Python 3.4 "pip" (Python Package Manager) which is useful to install python packages on the fly using command line interface comes with the Python installers by default* To check if pip is installed or not (Type pip in the command line after you set the environment variable correctly by following step 2 ) If you get an error : Follow the instructions given in the link – https://pip.pypa.io/en/stable/installing/ Setting up the virtual environment is useful to ensure versions of python packages are relevant to our application as python packages are installed across the system. Different applications might use different versions of python. To avoid this we will use virtual environment to avoid this ambiguity To install the virutal environment in Windows: 1. pip install virutalenv ------------------------------- To Create a virtual environment: 1. virtualenv "environmentName" Time to activate the virtual environment: 1. cd environmentName\Scripts\ 2. activate You will see the command line environment changed to your "environmentName " To install Django in your virtual environment 1. pip install Django To check if Django is installed or not Type the following in the command line 1. python You will get the python interpreter Type the following step 2 and 3 in the interpreter 2. import django 3. django.VERSION If you get the version similar to this (2.1.7, 'final', 0) - You are done Move to your working directory and can start working on it with this virtual environment set up
            Show
            nfreese Nowlan Freese added a comment - Helpful Django video tutorial: https://www.youtube.com/watch?v=UmljXZIypDc&list=PL-osiE80TeTtoQCKZ03TU5fNfx2UY6U4p
            Hide
            stiwari8 Srishti Tiwari (Inactive) added a comment -

            Useful tutorial to ease the development+deployment process (How to connect aws-ec2 with PyCharm Professional):

            https://minhoryang.github.io/en/posts/connect-aws-ec2-instance-with-pycharm-professional/

            Show
            stiwari8 Srishti Tiwari (Inactive) added a comment - Useful tutorial to ease the development+deployment process (How to connect aws-ec2 with PyCharm Professional): https://minhoryang.github.io/en/posts/connect-aws-ec2-instance-with-pycharm-professional/
            Hide
            omarne Omkar Marne (Inactive) added a comment - - edited

            Very useful tutorial to learn Django framework.

            Also this one can be really helpful: https://www.youtube.com/watch?v=F5mRW0jo-U4

            Explains everything you would want to know.

            Show
            omarne Omkar Marne (Inactive) added a comment - - edited Very useful tutorial to learn Django framework. Also this one can be really helpful: https://www.youtube.com/watch?v=F5mRW0jo-U4 Explains everything you would want to know.
            Hide
            inaylor Irvin Naylor (Inactive) added a comment -

            Found two fairly bulky tutorials discussing some of the major fundamentals and main points of Django usage and development, with the first including a few example projects:

            https://www.geeksforgeeks.org/django-tutorial/

            https://youtu.be/OTmQOjsl0eg

            Show
            inaylor Irvin Naylor (Inactive) added a comment - Found two fairly bulky tutorials discussing some of the major fundamentals and main points of Django usage and development, with the first including a few example projects: https://www.geeksforgeeks.org/django-tutorial/ https://youtu.be/OTmQOjsl0eg
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Good explanation of URLs and paths at https://youtu.be/OTmQOjsl0eg?t=1824 in Django Tutorial for Beginners | Full Course
            Explains templates well, also.

            Show
            ann.loraine Ann Loraine added a comment - - edited Good explanation of URLs and paths at https://youtu.be/OTmQOjsl0eg?t=1824 in Django Tutorial for Beginners | Full Course Explains templates well, also.
            Hide
            chirag24 Chirag Chandrahas Shetty (Inactive) added a comment -

            Please view the following video to learn more about Django Model:
            https://www.youtube.com/watch?v=2KqhBkMv7aM

            Show
            chirag24 Chirag Chandrahas Shetty (Inactive) added a comment - Please view the following video to learn more about Django Model: https://www.youtube.com/watch?v=2KqhBkMv7aM
            Hide
            jayostwal Jay Ostwal (Inactive) added a comment -

            Excellent tutorial, very straightforward and easy to follow steps. Also got help from the tutorials mentioned in the previous comments. Moving it to first level review.

            Show
            jayostwal Jay Ostwal (Inactive) added a comment - Excellent tutorial, very straightforward and easy to follow steps. Also got help from the tutorials mentioned in the previous comments. Moving it to first level review.

              People

              • Assignee:
                Unassigned
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: