Code Monkey home page Code Monkey logo

pdf_creator's Introduction

pdf_creator

A tool to create a pdf document based on inputs

dev setup

Here we are using a python virtual env via pipenv and not the virtual env and hence using Pipfile and Pipfile.lock to manage dependency and not requirements.txt. Please follow the below step to install these dependency in linux machine

pyenv

Install pyenv, a tool to manage multiple Python versions. It is a fork of rbenv and ruby-build, which do the same for Ruby. It installs these Python versions into your home directory, so doesn't require sudo or any other system-level manipulation.

For Linux systems pyenv-installer has been generally recommended, but we suggest reviewing the current install instructions in case the guidance has changed.

See common build problems if you have trouble installing.

Once that's complete, don't forget to update your shell config file (e.g. ~/.bash_profile, ~/.bashrc, or ~/.zshrc) as described in the installation instructions.

Python 3

Install the latest Python 3.x.y release with pyenv that matches our current version requirements and activate it as your global default. You can also use pyenv to set your current shell's Python version (pyenv shell), or for a specific folder (pyenv local).

For example, if the current convention is to use Python 3.8 and the latest release is 3.8.8:

$ pyenv install 3.8.8
$ pyenv global 3.8.8

Make sure your current pip and setuptools for Python 3.x.y are up-to-date.

$ python -m pip install --upgrade pip setuptools

Note that once you start using a pyenv-managed Python install for other tools below (e.g. those installed with pipx), uninstalling that Python version from pyenv will break those tools! Refer to the pipx notes for how to manage pipx when upgrading Python versions.

pipx

Install pipx, a tool for installing Python command-line scripts (not libraries) in their own isolated environments.

$ python3 -m pip install --user pipx

Prepend ~/.local/bin to your PATH env var if it isn't there already:

$ python3 -m userpath prepend ~/.local/bin

Or manually add the following to your shell config file (e.g. ~/.bash_profile, ~/.bashrc, or ~/.zshrc) and reload your shell:

export PATH=~/.local/bin:$PATH

note: we prepend to PATH so that it is searched before any pre-existing system-level Python paths

pipx and Python Upgrades

pipx is one of the only packages you'll install globally, since pipx lets you package isolate almost everything else. Unforunately this means that when you upgrade the Python that pipx was installed to it breaks both pipx and evverything installed with pipx.

You can account for this by following this process when upgrading, shown below with an example upgrade from 3.8.7 to 3.8.8:

$ python -m pip uninstall pipx

$ pyenv install 3.8.8
$ pyenv global 3.8.8
$ pyenv uninstall 3.8.7

$ python -m pip install --user pipx

# restart or source your shell to ensure reinstalled `pipx` is usable

# reinstalls all tools currently installed in `pipx` to use the new Python version
$ pipx reinstall-all

note: removing pipx isn't strictly necessary if you're only upgrading a patch release, but if you're upgrading to a new minor release (e.g. 3.8.x -> 3.9.x) then you will need to reinstall, so it's easier to just doc doing it.

pipenv

Install pipenv, a tool to manage Python package dependencies for applications.

$ pipx install pipenv

Add the following to your shell config file e.g. ~/.bash_profile, ~/.bashrc, or ~/.zshrc and reload your shell.

export PIPENV_PYTHON="$PYENV_ROOT/shims/python"

How to start the app locally?

git clone <this repo>
cd npdf_creator
pipenv install
pipenv shell
cd mysite
python manage.py runserver 0.0.0.0:8080

When you start the server locally open the browser and make sure you are able to access the service using url http://localhost:8080/docwrite

Now as a next step do the migrations and setup the admin superuser credentials with below steps

python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser

To confirm your migration is done and able to access the admin page start the runserver command again and hit the url http://localhost:8080/admin and use your super user to login

pdf_creator's People

Contributors

nishanthtofan avatar naggappan avatar

Watchers

 avatar

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.