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
| # tested on macOS 11.5.2 (Big Sur) after installing openssl and xz | |
| curl -OL https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz | |
| tar -xvf Python-3.9.7.tgz | |
| cd Python-3.9.7/ | |
| ./configure | |
| make | |
| make test # optional | |
| sudo make install |
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 { Injectable } from '@angular/core'; | |
| import { | |
| HttpRequest, | |
| HttpHandler, | |
| HttpEvent, | |
| HttpInterceptor | |
| } from '@angular/common/http'; | |
| import { Observable, BehaviorSubject } from 'rxjs'; | |
| import { filter, take, switchMap } from 'rxjs/operators'; | |
| import { SigninModuleState } from '../../signin/store/models/signin.model'; |
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 DjangoModel(models.Model): | |
| @classmethod | |
| def from_db(cls, db, field_names, values): | |
| instance = super().from_db(db, field_names, values) | |
| instance._state.adding = False | |
| instance._state.db = db | |
| instance._old_values = dict(zip(field_names, values)) | |
| return instance | |