Skip to content

Instantly share code, notes, and snippets.

View gabivoicu's full-sized avatar
🔥

Gabriela Voicu gabivoicu

🔥
  • Chicago
View GitHub Profile

Keybase proof

I hereby claim:

  • I am gabivoicu on github.
  • I am gabi_voicu (https://keybase.io/gabi_voicu) on keybase.
  • I have a public key ASD7j_bnaB8ezxDihqaaTAfpyGe8NfpnxdKX4Ue9IS49uwo

To claim this, I am signing this object:

@gabivoicu
gabivoicu / utils.py
Last active September 19, 2017 16:39
Method that needed request in send_email
def the_right_host(request):
HOST = "www.nexttier.com"
the_host = request.get_host()
if the_host.startswith("api-staging."):
return "stg.nexttier.com"
if the_host.startswith("local"):
return "localhost:3000"
return HOST
class SendNotificationMixin(SendEmailMixin):
def send_notification(self, request, users, tmpl_name='',
permission=None, achievement=None, fmt_args={},
create_center=True, force_notification=False,
message_type='', **kwargs):...
def send_completed_phase_achievement_notifications(self, request, stakeholder):...
def send_completed_achievement_notifications(self, request, completed_achievement):...
def post(self, request, *args, **kwargs):
with transaction.atomic():
serializer = CompletedAchievementCreateSerializer(data=request.data)
if serializer.is_valid():
achievement = Achievement.objects.get(id=serializer.data['achievement'])
stakeholder = Stakeholder.objects.get(id=serializer.data['stakeholder'])
if stakeholder.stakeholder_type in ['Parent', 'Counselor']:
return Response(status=status.HTTP_403_FORBIDDEN)
class ListCreateCompletedAchievements(FeedMixin, SendNotificationMixin, generics.ListCreateAPIView):
model = CompletedAchievement
permission_classes = (AchievementPermission,)
ordering = 'achievement__title'
def get_queryset(self):...
def get_serializer_class(self):...
from __future__ import unicode_literals
import logging
from stakeholder.models import StakeholderPreferences
from message.utils import SendEmailMixin
from .models import Notification, NotificationTemplate
from stakeholder.models import EMAIL, CENTER, PUSH
from stakeholder.constants import LETTER_OF_REC_REQUEST

Week 1 Homework:

HTML & CSS on Codecademy (you will need to get an account, but it is free)

If you have time, go through the entire course. If you have less time, complete at least the following parts:

  • HTML Basics
  • Build Your Own Webpage
  • HTML Basics II
  • HTML Basics III
  • CSS: An Overview
  • CSS Selectors
@gabivoicu
gabivoicu / devise.md
Last active September 19, 2017 16:59
Devise

Devise

A Ruby gem to help you store your user's password securely.

(kind of like BCrypt but with way more modules and opinions)

How Do We Store Passwords?