Added real registration that prompts for a username.
[zzz-floof.git] / floof / lib / dbhelpers.py
1 def find_or_create(model, **kwargs):
2 instance = model.get_by(**kwargs)
3 if not instance:
4 instance = model(**kwargs)
5 return instance