Tag

Django

Browsing

There are 3 main things we need to do: set STATIC_ROOT in settings.py run python manage.py collectstatic (or python3.5 or python3.6 as appropriate) Example: python manage.py collectstatic set up a Static Files entry on the PythonAnywhere Web tab. we can also customise STATIC_URL, if we want to use a static URL prefix other than /static/ STATIC_ROOT = os.path.join(BASE_DIR, ‘assets’) Set url.py to load template from .views import indexPageView urlpatterns = [ path(”, indexPageView, name=’index’)] Now,…

What is a Web Framework? A web framework is a code library which helps you to build a flexible, scalable, and maintainable, dynamic website, web app, and web services. Different web frameworks are Zend for PHP, Ruby on Rails for Ruby, etc. What is Django? Django is a web development framework for Python which offers a standard method for fast and effective website development. It helps you to assists in building and maintaining quality web…

How To Install Django 2 In Mac First, we need to install python3 in our system -> brew install python3 Now check the version of python -> python3 Install pip package management system. -> sudo easy_install pip Install virtualenv for python. -> sudo pip install virtualenv -> virtualenv ven -> cd venv -> source bin/activate Install Django 2 -> pip install django==2.0.3 check django2 version -> python -m django –version Create the Django project with…