This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
| ########## DO NOT INCLUDE THIS ########## | |
| # File Location: /etc/supervisor/conf.d/celery-beat-appcom.conf | |
| ######################################### | |
| [program:celery_beat_appcom] | |
| process_name=%(program_name)s | |
| command=/home/johndoe/django-app/celery-beat/run-appcom-celery-beat.sh | |
| startsecs=10 | |
| autostart=true | |
| autorestart=true |
| //index.js | |
| var express = require('express'), | |
| app = module.exports = express.createServer(), | |
| mongoose = require('mongoose'); | |
| mongoose.connect('mongodb://localhost/nodeAuth'); | |
| //configure app | |
| app.configure(function() { | |
| app.set('views', __dirname + '/views'); |
| 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) |