Exemplo n.º 1
0
 def create(self, request):
     attrs = self.flatten_dict(request.POST)
     try:
         name = attrs['name']
         slug = slugify(name)
         user = request.user
     except KeyError:
         return "You must set all the parameters"
     skill = Skill(name=name, slug=slug, user=user)
     skill.save()
     return skill
Exemplo n.º 2
0
 def add_skills(context):
     skill_set1, skill_set2 = Skill.get_splitted_skill_set()
     context['skill_set1'] = skill_set1
     context['skill_set2'] = skill_set2
     return context
Exemplo n.º 3
0
from portfolio.models import Skill, Project


r_skill = Skill(name="R")
r_skill.save()

python_skill = Skill(name="Python")
python_skill.save()

pandas_library_skill = Skill(name="Pandas Library")
pandas_library_skill.save()

bokeh_library_skill = Skill(name="Bokeh Library")
bokeh_library_skill.save()

numpy_library_skill = Skill(name="Numpy Library")
numpy_library_skill.save()

bash_skill = Skill(name="Bash")
bash_skill.save()

pig_skill = Skill(name="Pig")
pig_skill.save()

data_science_skill = Skill(name="Data Science")
data_science_skill.save()

statistics_skill = Skill(name="Statistics")
statistics_skill.save()

machine_learning_skill = Skill(name="Machine Learning")