Commit f9f2bd23 authored by amandazk's avatar amandazk

Revertendo

parent ff1983d2
from django.db import models
from django.contrib.auth.models import User
class Pessoa(models.Model):
objects = models.Manager() #evitar erro no vscode
......@@ -15,6 +16,12 @@ class Pessoa(models.Model):
related_name='pessoas'
)
user = models.OneToOneField(
User,
on_delete = models.CASCADE
)
def __str__(self):
return self.nome_pessoa
......
......@@ -29,8 +29,6 @@ class PessoaCreate(generics.CreateAPIView):
serializer_class = PessoaSerializer
permission_classes = ()
class PessoaGet(generics.RetrieveAPIView):
"""Listando uma pessoa"""
queryset = Pessoa.objects.all()
......
......@@ -156,19 +156,19 @@ export default {
this.log.console(response);
});
},
addFone() {
axios
.post("/api/fones/add/", this.fone, {
headers: {
Authorization: `Token ${this.$session.get("token")}`,
},
})
.then((response) => {
this.dialog = false;
this.$emit("updateFone");
this.log.console(response);
});
},
// addFone() {
// axios
// .post("/api/fones/add/", this.fone, {
// headers: {
// Authorization: `Token ${this.$session.get("token")}`,
// },
// })
// .then((response) => {
// this.dialog = false;
// this.$emit("updateFone");
// this.log.console(response);
// });
// },
},
};
</script>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment