jhauserw3241 / cdcdb-webserver

Python3/Flask web server for DB final project
https://cdcdb.system33.pw
1 stars 1 forks source link

Change the title of the website to be Cyber Defense Club #64

Closed jhauserw3241 closed 7 years ago

pastly commented 7 years ago

https://github.com/pastly/cdcdb-webserver/blob/master/server.py#L282

I think all that needs to happen is updating config.ini

edit: maybe there's other references to "cdcdb," but a quick grep would help find hard-coded "cdcdb" strings.

grep -rni cdcdb /path/to/src/cdcdb

jhauserw3241 commented 7 years ago

Solution is here: https://github.com/pastly/cdcdb-webserver/commit/83bf37d01553c8df13be88ef991acbaf4d578839

pastly commented 7 years ago

I really suggest you update the config.ini with the desired app_name and app_tagline

jhauserw3241 commented 7 years ago

I saw that, but do you think it would be better to update it there or just remove it from the config? Theoretically, once I change it in the base.html file, it will never change again, right?

pastly commented 7 years ago

If we ever want to print the app name or app tagline somewhere else, variables are great. If this spot in the header is the only place you expect them to be, then removing all app_name and app_tagline and opting for hard-coded values is fine.

jhauserw3241 commented 7 years ago

Ok. I'm fine with that. However, I was thinking about putting the logo instead of the tagline. Should I put the location to the file there instead?

pastly commented 7 years ago

If we are putting a logo and "Cyber Defense Club" up there, we're going to be restructuring anyway. Might as well remove the app_* variables.

jhauserw3241 commented 7 years ago

Where are those defined?

pastly commented 7 years ago

In config.ini and used at the bottom of server.py

jhauserw3241 commented 7 years ago

Additionally, I don't think I can modify the config.ini file the way that my current git ignore file is setup. Do you want to do that or should I?

jhauserw3241 commented 7 years ago

If you think it would be helpful to keep the app_* variables, I'm fine with that. I'm just wondering what the best way to go about using them is.

jhauserw3241 commented 7 years ago

Because we could remove the tagline variable and create a logo variable and they would work great.

pastly commented 7 years ago

config.ini is not version controlled for security reasons. It has secrets in it.

Add/remove whatever variables you want in it. Use them wherever you want. If a variable isn't used anywhere, it should get removed from config.ini

Whatever you do and commit to master I will do on the "authoritative" copy of the website at https://cdcdb.system33.pw

pastly commented 7 years ago

If you're going to configure a logo path in config.ini, it should probably look something like '/static/logo.png'. Ya know, the path part of the URL so you can <img src='{{ app_logo }}'>

jhauserw3241 commented 7 years ago

Ok, but then how do you want me to get my changes to the config file to you?

pastly commented 7 years ago

I can just snoop on your home folder

edit: getting the config.ini to me is the easiest part. Don't worry about it :)

jhauserw3241 commented 7 years ago

That works. Ok. Sounds good. Working on that now.

jhauserw3241 commented 7 years ago

Solution is here: https://github.com/pastly/cdcdb-webserver/commit/473642fe109502193d15000e68dd5f0896a9bb27