Code Monkey home page Code Monkey logo

Comments (3)

WhyNotHugo avatar WhyNotHugo commented on July 30, 2024

We use weasyprint for the pdf generation, so I suggest you check their documentation regarding exactly what's supported and what's not.

Personally, I'd recommend using more tables and "old school" HTML. Especially since you don't usually need responsiveness for PDFs.

from django-afip.

gusarg81 avatar gusarg81 commented on July 30, 2024

Ok. I've tried using, for testing purposes, their invoice example and still It looks that CSS is being loaded. It seems that is searching for django_afip static instead of mine and I've followed what it says here: https://django-afip.readthedocs.io/en/latest/printables.html#templates "simply place a template with the same path/name inside your own app, and make sure it’s listed before django_afip in INSTALLED_APPS."

...
'apps.billing',
'django_afip'
...

Also, the templates path is correct (I think):

ebiller/templates/receipts/

Or should be inside the app itself? (because I've placed inside the project templates path instead of app template path, since I store all templates in only one place, the main project one).

EDIT1: also tried putting the template inside app path, and the same thing happens.
EDIT2: Never mind... was a bad typo in the css path... :/

from django-afip.

WhyNotHugo avatar WhyNotHugo commented on July 30, 2024

Looks like you've solved this, however, keep in mind that:

Django sees all template locations as one big thing. It doesn't discriminate on location from another, so putting a template in the templates directory of any of the INSTALLED_APPS will make them get picked up.

The same applies to static files (actually, when deploying, static files are all copied into one same place, and read from there).

from django-afip.

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.