Skip to content

Instantly share code, notes, and snippets.

View tacianosilva's full-sized avatar
:octocat:
Studying!

Taciano Morais Silva tacianosilva

:octocat:
Studying!
View GitHub Profile
def get_horarios_str(self):
ret = ''
print(self.horarios.all())
# use models.ManyToMany field's all() method to return all the Department objects
# that this employee belongs to.
for horario in self.horarios.all():
ret = ret + horario.__str__() + ','
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'scdb_dev',
'USER': 'sc_user',
'PASSWORD': 'sc_user',
'HOST': '127.0.0.1',
'PORT': '3306',
# optional:
'OPTIONS': {
@tacianosilva
tacianosilva / PY0101EN-2-4-Dictionaries.ipynb
Created January 13, 2019 16:13
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.