Skip to content
Snippets Groups Projects
Select Git revision
  • 626f81e0202a117721625b1e85e28f1b78151623
  • master default protected
2 results

dkbn

  • Clone with SSH
  • Clone with HTTPS
  • Tue Herlau's avatar
    tuhe authored
    626f81e0
    History
    # Kubusnet
    Main development directory (base): `dev/dkbn2`.
    Main entry point: `dev/dkbn2/dkbn2/settings.py` (check names of database user, etc.). 
    
    Example server (to see what works right now): https://kubusnet.loca.lt/
    
    Deployment is on linux, but I also got it to work on windows.
    
    # Getting started:
     - Install python. I am using python 3.9 and 3.8 (development/deployment). I don't think 3.11 has issues
     - I use most recent versino of django (4.x)
     - I use pycharm, but it is not important. If you use pycharm, start project at another location on your computer, and add the kubusnet directory as a sources location in the project structure (ctrl+alt+s). This will make sure your pycharm config files are not commited to the repository and will cause conflict. Pycharm has a web-development-extension in the professional version, but I am not seeing a ton of benefit, and I have not gotten the debugger to work with Django  (but if you can, it will help you a ton). 
     - Run the django guide for the first webapp using postgresql as backend:
     	- https://docs.djangoproject.com/en/4.0/intro/tutorial01/
     - Then pull this repo using `git pull`. Push/pull very frequently to main branch to avoid conflicts. 
     - run `pip install -r requirements.txt` to get most dependencies. Keep this up to date if you spot something that is missing.
     - Add a configuration specific to your computer to `settings.py` (check how I have two settings for linux/win right now). This will allow us to use a single branch. Use same user/password for postgresql for simplicity.
     - `python manage.py check` will check install. This should give an ok.
     - `python manage.py runserver` should work (as in the guide). Your first (admin) user will not have a profile, but this will be automatically created the first time you try to select a project.
     - Use admin panel to add users/project. Do this by first creating a project, then use mass `add user` functionality (bottom link). This will generate passwords, etc. correctly.
    
    ## Fixing bugs
     - The code used to work, so the root cause of bugs are changes in Django since 0.9.x and libraries changing. Right now all generic views must be changed (from functional to class-based), and many/all urls are broken. These are reasonably easy to fix by using standard guides for upgrading between django versions and naming urls in `urls.py`. Note templates must be updated as well to use the new names (as in the tutorial). 
     - First goal is to get the main pages working (meetings, communication, tasks, notepads, mindmap). Most will hopefully be very quick individually, but overall it will require a lot of work.
     - I had to re-order the code into many web-apps to get it to work which is not optimal; the code layout is pretty wonky, as is the location of templates, etc. We just have to live with that.
     - Once the main things work, we need to fix some of the UI issues that has cropped up (help pages spill into html, forms that are organized poorly)
     - Then remove functionality that is not necesary anymore/simplify. Probably a good idea to print out all pages and pin them to a bulletin board to get an overview of current functionality.
    
    ## Notes:
    postgres (win)
    postgres / gummiand
    port: 5432
    Postgres user for kubusnet: kubusnet/gummiand. Database name: kubusnet. 
    
    
    kubusnet_media is user uploaded files
    kubusnet_static is (development) static files
    kubusnet_static_col is automatically generated using
    
    Use this to create admin login user (tue/gummiand)
    ```
    python manage.py createsuperuser
    ```
    
    python manage.py collectstatics
    python manage.py check