From d4a86f494a62e85818f82737ccadbf781df8e179 Mon Sep 17 00:00:00 2001 From: Abhishekjindal09 <63978019+Abhishekjindal09@users.noreply.github.com> Date: Fri, 2 Oct 2020 17:53:14 +0530 Subject: [PATCH 1/3] Update models.py --- polls/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/polls/models.py b/polls/models.py index 44dcbe8..bdf3204 100644 --- a/polls/models.py +++ b/polls/models.py @@ -24,7 +24,8 @@ def was_published_recently(self): class Choice(models.Model): question = models.ForeignKey(Question) - choice_text = models.CharField(max_length=200) + choice_textmax = models.CharField(max_length=200) + choice_textmin = models.CharField(min_length=200) votes = models.IntegerField(default=0) def __str__(self): From b0f5423400e34bdbda88d8dd25be183c82b94423 Mon Sep 17 00:00:00 2001 From: Abhishekjindal09 <63978019+Abhishekjindal09@users.noreply.github.com> Date: Sun, 4 Oct 2020 01:38:45 +0530 Subject: [PATCH 2/3] Help --- README.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..20eb06e --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Django-site +Django-site +Help Me +Looking For Suggestions From be843da3d046e6b8a12dddffbaa64a932674cd1c Mon Sep 17 00:00:00 2001 From: AbhiHack1 <72274325+AbhiHack1@users.noreply.github.com> Date: Sun, 4 Oct 2020 02:07:10 +0530 Subject: [PATCH 3/3] Add my test case and function Added a test case to catch any errors! It has a state It switches b/w true/false depending on requirements Also added a function to be used in other places, feel free to use it. Hope you like it!! --- myCalendar/models.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/myCalendar/models.py b/myCalendar/models.py index d2b09cc..5259bbc 100644 --- a/myCalendar/models.py +++ b/myCalendar/models.py @@ -26,3 +26,21 @@ def short(self): class Meta: verbose_name_plural = "entries" + TestMode = True +def some_function(): + global TestMode + TestMode = False +some_function() +print(TestMode) <--Returns False +var_one = 123 +def func_one(var_one): + var_one = 234 + var_three = 'abc' + +var_two = 456 + + +def func_two(): + var_four = 123 + print(dir()) +func_two()