Giter VIP home page Giter VIP logo

Comments (7)

GDay avatar GDay commented on June 12, 2024

Hmm.. that's weird.

Okay, let's debug this a bit. First check the name of the docker container:

docker ps

Open Django shell by going into the docker container (I am using chiefonboarding_web as the docker name here, change it with whatever you have):

docker exec -it chiefonboarding_web python manage.py shell

Sending email manually (change email address to where you want this test email to go):

from django.conf import settings
from django.core.mail import send_mail

send_mail("Test subject", "Test message", settings.DEFAULT_FROM_EMAIL, ["[email protected]"])

The only thing that I have changed here compared to the code in the app, is that I didn't add an HTML email here, but I don't think that will matter much. If it fails, it should show an error message, which should give us more info on why it failed.

If that works, then let's see if you indeed have everything that you need to send the email. You should have a bunch of WelcomeMessage records. Try to do this, in that same shell:

from organization.models import WelcomeMessage
print(WelcomeMessage.objects.all().count())

The number that it shows should be 35.

from chiefonboarding.

GDay avatar GDay commented on June 12, 2024

As an update: I just got an email with "Test subject" and "Test message" in the mail. Not sure if it was you, but you probably should have changed the email address (as mentioned above). Just so you know... it worked (if that indeed was you, lol).

from chiefonboarding.

mangatinanda avatar mangatinanda commented on June 12, 2024

Hey sorry. Yes, that was me. Changed the email after running that command :|

WelcomeMessage objects are not present. Did I miss initialising some data?

from chiefonboarding.

GDay avatar GDay commented on June 12, 2024

Hah, no worries!

Okay, that's easy to fix. Previously, this needed to run separated, but with the latest version it doesn't. Anyways run (change chiefonboarding_web):

docker exec -it chiefonboarding_web python manage.py loaddata welcome_message.json

when it's done, it will say that it imported 35 items or so.

from chiefonboarding.

mangatinanda avatar mangatinanda commented on June 12, 2024

Thank you so much for patiently helping me. It is working fine now. We will setup the app now.

Before I close, Anything else I would have missed running?

from chiefonboarding.

GDay avatar GDay commented on June 12, 2024

You are welcome. Happy to help!

If you want to load some demo data, then you could run this command as well (change chiefonboarding_web):

docker exec -it chiefonboarding_web python manage.py loaddata all.json

Note: if you already have some data in the application, then that might get wiped/overwritten by the data in that fixture. So, if you already created some templates/sequences, then it's probably not a good idea to run that.

You should be good to go though!

from chiefonboarding.

mangatinanda avatar mangatinanda commented on June 12, 2024

Sure. Thank you so much for your help 🙏 🙇‍♂️

from chiefonboarding.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.