Scenario: You want to install Python 3.6+ on MacOS Sierra (or other MacOS versions running older Python versions) using a virtual environment. Here's the order we're going to go about things: Install Python3 Create a virtual environment using venv Install Django in the virtual environment Install Python3 It is not a good idea to upgrade your mac to Python3. Instead, you can install Python3 as an app. It will update your shell so when you invoke python3 in the terminal it will … [Read more...] about Installing the latest version of Django and running Python3 in a virtual environment on Mac
Django
Django Error: AttributeError: ‘module’ object has no attribute ‘xxx’
So you're working through creating some models and you attempt to make migrations when you're done but you get the following error or something similar: File "/home/dan/Documents/djlab/mysite/polls/models.py", line 5, in <module> class Question(models.Model): File "/home/dan/Documents/djlab/mysite/polls/models.py", line 6, in Question question_text = models.Charfield(max_length=200) AttributeError: 'module' object has no attribute 'Charfield' This error can happen with … [Read more...] about Django Error: AttributeError: ‘module’ object has no attribute ‘xxx’
Recent Activity