목록Personal DB/Unclassified record (50)
Silver Library (Archived)
Unlike other language does function like function(): in Django, this sounds like: {% if something.has_previous %} no (bracket), nor colon + except Exception stead, using Exception such like exception EmptyPage is better to use. => in order to return when a specific error occurred, targeting response to the error is better. (stead of Excepting all equally). *Why doing this? To prevent a troll use..
Finally, back to the track. And found that how I generate them with a random number as well. def add_arguments(self, parser): parser.add_argument( "--number", default=2, type=int, help="How many rooms you want to create" ) On terminal, python manage.py seed_rooms --number (input the amount I want to create, without bracket) * Once I stuck, be sure to go back from the current position first. Not ..
I know I should not waste my time here...but finally, I understood where the problem came from. [I FORGOT TO ADD A CONTENTS IN THE ADMIN SECTOR. e.g. ROOMS, REVIEWS.] Very easy. I just forgot to add them all again after I cleaned up the materials for the testing purpose. Least now I know the code was perfect, and I can proceed to the next phase. =========== If I face any error with a message "Mo..
pypi.org/project/django-countries/ django-countries Provides a country field for Django models. pypi.org Be sure to find some code for installation here if the error occurs like: ModuleNotFoundError: No module named 'django_countries' If pillow drives you crazy, try this: python3 -m pip install --upgrade pip python3 -m pip install --upgrade Pillow pillow.readthedocs.io/en/latest/installation.htm..