- Open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.
- If you are new to Amazon Route 53, you see a welcome page; choose Get Started Now for DNS Management. Otherwise, choose Hosted Zones in the navigation pane.
- Choose Create Hosted Zone.
- For Domain Name, type your domain name.
- Choose Create.
- Click the Hosted Zone, edit record set.
- In the value, add
ec2-54-152-134-146.compute-1.amazonaws.com. - Change your DNS file to point to the IPv4 address (This would be in something like GoDaddy).
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.fixture(autouse=True) | |
| def mute_signals(request): | |
| # Skip applying, if marked with `enabled_signals` | |
| if 'enable_signals' in request.keywords: | |
| return | |
| signals = [pre_save, post_save, pre_delete, post_delete, m2m_changed] | |
| restore = {} | |
| for signal in signals: | |
| restore[signal] = signal.receivers |
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
| """ | |
| Mako Template Backend | |
| This is the implementation of Mako template backend in order to use | |
| it as a Django Template Backend alternative in this project template | |
| system. This backend is a class that inherits | |
| django.template.backends.base.BaseEngine. It must implement | |
| get_template() and optionally from_string(). | |
| """ |
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 AllowPUTAsCreateMixin(object): | |
| """ | |
| The following mixin class may be used in order to support PUT-as-create | |
| behavior for incoming requests. | |
| """ | |
| def update(self, request, *args, **kwargs): | |
| partial = kwargs.pop('partial', False) | |
| instance = self.get_object_or_none() | |
| serializer = self.get_serializer(instance, data=request.data, partial=partial) | |
| serializer.is_valid(raise_exception=True) |
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 channels.auth import AuthMiddlewareStack | |
| from rest_framework.authtoken.models import Token | |
| from django.contrib.auth.models import AnonymousUser | |
| from django.db import close_old_connections | |
| class TokenAuthMiddleware: | |
| """ | |
| Token authorization middleware for Django Channels 2 | |
| """ |
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
| You can use either GenericViewSet or ModelViewSet(as its also inherited from GenericViewSet). | |
| Using GenericViewSet or ModelViewSet | |
| # or class PolicyViewSet(viewsets.GenericViewSet): | |
| class PolicyViewSet(viewsets.ModelViewSet): | |
| def list(self, request): | |
| queryset = Policy.objects.all() | |
| page = self.paginate_queryset(queryset) |
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
| function killemall(){ | |
| sudo ps aux | grep -e $1 | grep -v grep | awk '{print $2}' | xargs kill -9 | |
| } | |
| export DJANGO_PORT=8080 | |
| alias run='python manage.py runserver' | |
| alias rr='killemall manage.py;reset;run $DJANGO_PORT' |
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
| version: '2.1' | |
| services: | |
| mysql: | |
| container_name: mysql | |
| image: mysql:5.7 | |
| ports: | |
| - "13306:3306" | |
| environment: | |
| - MYSQL_ROOT_PASSWORD=Welcome123 | |
| healthcheck: |
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
| version: '2.1' | |
| services: | |
| mysql: | |
| container_name: mysql | |
| image: mysql:5.7 | |
| ports: | |
| - "13306:3306" | |
| environment: | |
| - MYSQL_ROOT_PASSWORD=Welcome123 | |
| healthcheck: |
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
| /* global SETTINGS:false zE:false _:false */ | |
| __webpack_public_path__ = `${SETTINGS.public_path}` // eslint-disable-line no-undef, camelcase | |
| import R from "ramda" | |
| import _ from "lodash" | |
| import { wait } from "../util/util" | |
| // Start of odl Zendesk Widget script | |
| /* eslint-disable no-sequences, prefer-const */ | |
| /*<![CDATA[*/ |
NewerOlder