How one can make a web site with Python and Django – BASICS (E01)



Welcome to my full tutorial collection about easy methods to construct a web site! I requested our instagram followers what they wished to see from our channel within the subsequent month and the overwhelming response was “we need to see easy methods to make a web site utilizing Django and Python”. On this episode, we’ll discuss easy methods to create a virtualenv for our Python dependencies and bootstrap a Django app.

This tutorial might be a number of components lengthy. I am going to go in-depth on easy methods to create a Django server with Python, setup a database, create net pages/fashion them with css, and even deploy the applying to the cloud.

We will use 4 totally different applied sciences on this tutorial:
1. Django – for our net server
2. Postgres – for our database
3. Docker – to bundle the applying
4. Kubernetes – to handle deployment within the cloud

The entire code for this undertaking might be obtainable on our Patreon web page:
https://www.patreon.com/posts/python-django-38642815

I hope. you guys get pleasure from!

source

29 thoughts on “How one can make a web site with Python and Django – BASICS (E01)”

  1. This is a great tutorial. Not sure how you get VS to recognize the django modules in the syntax checking. Is there specific VS extension that you are using for django definitions? The one I have installed does not map the modules to a source.

    Reply
  2. sooo, pyenv virtualenvs doesn't work anymore, and I cannot find an equivalent of that command for pyenv, only for conda but it's not the same… Help, anyone?

    Reply
  3. Traceback (most recent call last):

    File "C:UsersMezaaDesktopmezaa_websiteenvlibsite-packagesdjangoappsconfig.py", line 244, in create

    app_module = import_module(app_name)

    File "c:usersmezaaappdatalocalprogramspythonpython37libimportlib__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

    File "<frozen importlib._bootstrap>", line 1006, in _gcd_import

    File "<frozen importlib._bootstrap>", line 983, in _find_and_load

    File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked

    ModuleNotFoundError: No module named 'accounts'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):

    File "manage.py", line 22, in <module>

    main()

    File "manage.py", line 18, in main

    execute_from_command_line(sys.argv)

    File "C:UsersMezaaDesktopmezaa_websiteenvlibsite-packagesdjangocoremanagement__init__.py", line 419, in execute_from_command_line

    utility.execute()

    File "C:UsersMezaaDesktopmezaa_websiteenvlibsite-packagesdjangocoremanagement__init__.py", line 395, in execute

    django.setup()

    File "C:UsersMezaaDesktopmezaa_websiteenvlibsite-packagesdjango__init__.py", line 24, in setup

    apps.populate(settings.INSTALLED_APPS)

    File "C:UsersMezaaDesktopmezaa_websiteenvlibsite-packagesdjangoappsregistry.py", line 91, in populate

    app_config = AppConfig.create(entry)

    File "C:UsersMezaaDesktopmezaa_websiteenvlibsite-packagesdjangoappsconfig.py", line 250, in create

    app_config_class.__qualname__,

    django.core.exceptions.ImproperlyConfigured: Cannot import 'accounts'. Check that 'mezaa_website.apps.accounts.apps.AccountsConfig.name' is correct.

    Reply
  4. How do I delete virtualenvs created this way? I accidentally used the wrong version. I have been googling for literally 2 hours and cannot find an answer. I want to remove every virtualenv I created and start from scratch. please help

    Reply
  5. What I am curious about is why do all this when you can use HTML and PHP and JavaScript and do literally NO configuration? There is so much work just to get to the point where you can start coding a website with these techs. You have to learn command line just to get started. Even Node.js is easier to get started with. So what is the benefit other than a semantic language?

    Reply
  6. After creating the files in VsCode and going to terminal to run pip install -r requirements/dev.txt i get this error :
    ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements/dev.txt'

    Reply
  7. Jesus loves you! Jesus is King! If you do not know Jesus as Savior please pray, “ Jesus save me. At this moment I choose to have faith that You gave Your life for me and rose from the dead. Doing this You defeated death, even though it meant You had to die. You surrendered Your life for me, so I chose to surrender my life to You. Forgive me Jesus, my God. Amen.”

    Jesus loves you so much. Please accept His love. I encourage you to read the Bible and pray.

    “For God so loved the world that he gave his one and a only Son, that whoever believes that in him shall not perish but have eternal life.”
    John 3:16

    🙏❤️🙏

    Jesus is enough!

    Again I tell you, Jesus loves you!

    Reply
  8. OhMyZsh tells me that there are some directories that don't have write permissions. I tried to change them but even though my profile is admin macOS tells me that the operation can't be completed because I don't have permission. Anyone else stumbled upon this error?

    Reply
  9. can anyone help me when i try to manually activate my python file it says: Failed to activate virtualenv.

    Perhaps pyenv-virtualenv has not been loaded into your shell properly.
    Please restart current shell and try again. (how do you check if it is not loaded in properly)

    Reply

Leave a Comment