Skip to content

Instantly share code, notes, and snippets.

View MattBlack85's full-sized avatar
🦉
owly crap

Mattia Procopio MattBlack85

🦉
owly crap
  • Kraków
View GitHub Profile
#include <dirent.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
int main(void) {
DIR *main_dir;
FILE *temp_file;
struct dirent *read_dir;
@MattBlack85
MattBlack85 / fields.py
Created April 28, 2015 13:17
DRF GeometryField
class GeometryExcpetion(Exception):
pass
class GeometryField(serializers.Field):
geom_type = None
def __init__(self, *args, **kwargs):
if not self.geom_type:
raise GeometryException('You must declare a `geom_type` attribute on your field'