| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Before proceeding any further, make sure you have completed the steps outlined above.
We are attempting to build this project in a modular fashion that will allow flexible implementation of the application. The idea is that there might be multiple instances of this app in production and each instance will want to have its own custom settings, for example, which database it is connecting to, which apps are connected, allowed hostnames, etc...
Without any customizations, the site will connect to a local sqlite3 database. This is an ideal, fast and simple option for local development. After running the migrate command an empty sqlite database will be created in the project root called db.sqlite3. This file is already in the .gitignore file.
Static files are not stored in the git repository, they can be pushed to the static file server using python manage.py findstatic and downloaded to a machine for local development using python manage.py collectstatic. If this step is skipped the "you are not using chrome" warning message will show and images will appear broken on the "127.0.0.1:8000/en" page
The first step of customizing the site's configuration is by cloning the .env_sample file and renaming this copy to .env. This file is also in the .gitignore. This file has numerous switches and flags that can be used for customizing the application. The .env_sample file has a lot of annotation and the configuration settings should be fairly straight-forward. If you find any of them confusing, please open an issuein the dmapps repo.
Most types of customizations can be done through the .env file. However, changes made to which apps are switched on/off or which type of database backend you want to use must be done in a separate file. To do these types of customization, make a copy of the file called ./dm_apps/default_conf.py to ./dm_apps/my_conf.py. The latter file is in the .gitignore therefore none of the changes made will be recorded to the repo. If the my_conf.py file is present when the application boots up, the default_conf.py file will be ignored and the application will look to the my_conf file. At this point you would be free to make any changes you like to the my_conf.
If you are connecting to a mysql database, you do not need to make a custom my_conf. Instead simply provide the database credentials in the .env.
Important: You should not be making changes to the .env_sample and/or default_conf.py unless these are changes that are meant to be persist in the repository for all users. For example, if you were working on a new app, you would eventually have to modify the default_conf.
Apps can be easily connected and disconnected from an instance of the application. To do so, you simply comment / uncomment the app of interest in the app dictionary: my_conf.APP_DICT. Each connected app should have a card display on the site's main index page.
| Back | FazBrowse Home | New Git URL |