This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Category(models.Model): | |
| name = models.CharField(max_length=200, default='') | |
| slug = models.SlugField(max_length=100,default='',unique=True) | |
| def __unicode__(self): | |
| return self.name | |
| class SubCategory(models.Model): | |
| category = models.ForeignKey(Category) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| l = input('Enter lowest no.') | |
| h = input('Enter higest no.') | |
| def check_prime(n): | |
| if n < 2: | |
| return False | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" rel="stylesheet" /> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script> | |
| <script> | |
| var company_field = jQuery('#acf-field-company_name'); | |
| var is_admin = jQuery('#post_author_override')[0]; | |
| if(is_admin != undefined){ | |
| company_field.select2({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * L.TileLayer is used for standard xyz-numbered tile layers. | |
| */ | |
| L.Google = L.Class.extend({ | |
| includes: L.Mixin.Events, | |
| options: { | |
| minZoom: 0, | |
| maxZoom: 18, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import unittest | |
| class TestExample(unittest.TestCase): | |
| def test_hello_world(self): | |
| self.assertEqual("hello world", "hello world") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def test_hello_world(): | |
| assert "hello_world" == "hello_world" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pytest | |
| pytest-django | |
| pytest-cov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from .settings import * # NOQA | |
| DATABASES = { | |
| 'default': { | |
| 'ENGINE': 'django.db.backends.sqlite3', | |
| 'NAME': ':memory:' | |
| } | |
| } | |
| EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [pytest] | |
| DJANGO_SETTINGS_MODULE=project.test_settings | |
| addopts = --nomigrations --cov=. --cov-report=html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [run] | |
| omit = | |
| *apps.py, | |
| *migrations/*, | |
| *settings*, | |
| *tests/*, | |
| *urls.py, | |
| *wsgi/*, | |
| manage.py |
OlderNewer