Model.objects.create as default

2021-02-06 Thread degnon...@gmail.com
hi, say I have this model class Event(models.Model): ... metrics = models.OneToOneField("evmetrics.Metrics", on_delete=models.PROTECT, default=Metrics.objects.create) I want to be sure of what I'm writing here, for each new Event object created, a new Metrics object will be create and link

IntegrityError on a foreign key constraint

2021-01-30 Thread degnon...@gmail.com
Hi, I'm having a really incomprehensible error currently. We are working with three models here, "DataImport", "Contact" and "Dataset", the DataImport model import data from a file to a Dataset object, the data is imported as a Contact object , the DataImport model have a foreign key to the Dat

Auto refreshing frontend

2021-01-05 Thread degnon...@gmail.com
Hello, I am building a very simple website in which the main page allows users to import their contacts via csv or excel files to a postgres database. I have a page that displays whether or not the import of contacts is finished, I need my frontend to update automatically as soon as the task i

Deploy you django project

2020-10-11 Thread degnon...@gmail.com
HI guys I hope you are all doing well, for those of you looking for a way to deploy your django projects i wrote a blog post on how to achieve that on a personal blog i started recently (today in fact).Feel free to take a look and give me your feedback. You can check the article here: https:/

Mass Emailing

2020-10-01 Thread degnon...@gmail.com
Hi, hope every one is doing fine, I have an issue that I have not been able to resolve for several months now. I have two apps where I need to send a bunch of emails on a monthly basis, The first app is host on heroku and the second on DigitalOcean with dokku, for async task I'm using Django_Q