-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation for those who fork #204
Comments
Hey @dscotese how did you deploy your fork? Any chance you can direct me / update the wiki ? maps4all.org url doesn't seem to be working any longer |
I did it on Linux and it was a long time ago. If you tell me what happens when you follow one of the steps in the main Readme (for the h4i project, not mine) and it doesn't have the effect you expected, I might remember how I got around or fixed that. |
Sure, thanks! |
Do you happen to know how to make Reset PasswordI compared our source code and they seem to have the same way of handling reset password. I'm not sure if you also faced this issue? 2021-02-18T12:35:14.107194+00:00 app[web.1]: [2021-02-18 12:35:14,105] ERROR in app: Exception on /account/reset-password [GET] 2021-02-18T12:35:14.107235+00:00 app[web.1]: return self.view_functionsrule.endpoint 2021-02-18T12:35:14.107397+00:00 app[web.1]: Exception on /account/reset-password [GET] 2021-02-18T12:35:14.107402+00:00 app[web.1]: File "/app/app/account/views.py", line 60, in reset_password_request 2021-02-18T12:35:14.363930+00:00 app[web.1]: --- Logging error --- 2021-02-18T12:35:14.365238+00:00 app[web.1]: File "/app/app/account/views.py", line 60, in reset_password_request 2021-02-18T12:35:14.365521+00:00 app[web.1]: 2021-02-18T12:35:14.366013+00:00 app[web.1]: raise SMTPDataError(code, resp) 2021-02-18T12:35:14.366087+00:00 app[web.1]: Call stack: 2021-02-18T12:35:14.370112+00:00 app[web.1]: Message: 'Exception on /account/reset-password [GET]' Invite user / Sender identity verificationNote I have setup the Sendgrid addon and added API keys to config variables. I have also verified Sender identity. This is my worker process log right after I click the "Invite" button. (The web process log seems to work ok, it has 200 status codes). Maybe I am missing something in addition to the sender identity verification? 2021-02-18T12:56:41.037456+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask_mail.py", line 492, in send 2021-02-18T12:56:41.037458+00:00 app[worker.1]: raise SMTPDataError(code, resp) 2021-02-18T13:03:26.097815+00:00 app[worker.1]: 13:03:26 Cleaning registries for queue: default Please let me know if you need any more info. My updated project is at https://github.com/paulowe/maps4resources |
I figured it out. I hadn't set one of the config variables in email.py |
Which variable, in case someone else runs into it? |
In addition to the ADMIN_EMAIL and the Sendgrid config variables, you need to set EMAIL_SENDER config variable |
Hi @dscotese how did you relate resources to a locale and make them display on each locale's path http://www.resourcemap.org/national/ vs http://www.resourcemap.org/temecula-valley/ ? I managed to setup your repository and get it to run. I am also using the Sqlite3 database to create all the tables. I created a locale table and added 2 locales. I also added a resource and made sure I assigned it the same ID as the locale I want to relate it to. The only issue is that none of the resources are displaying on the interface. Do I need to change anything else? Thank you! |
The Resource table (line 170 in Resource.py) has a field called locale_id (you mentioned "ID" and I suppose you meant "locale_id"). The path element "national" is hardcoded in that file too because it is handled specially. I can't remember how the database tables get created, but my impression is that the files in app/models/ are responsible for it. There are many aspects of this code that I don't feel I ever fully understood, and "Blueprint" is one of them. There is also a custom.js file that is loaded to alter the page after it loads, but I don't think that has anything to do with the question you're exploring. The simple answer might be: "national" is a default kind of locale to display all the other locales, and the code that adds it (as a locale) to the database is in Resource.py. Keep asking, as I'm interested in (re-)learning what I had to learn to get resourcemap.org into the state it's in. |
Hi @dscotese thank you, I believe the database is updating correctly. Here is a graphical view of the
But the issue is that none of the resources are being created as pins on the map for both locale paths Do you think it has something to do with code in resource.py and other files in the models folder? It seems like fetching data from database runs with status 200 so it should be ok, right? Here is what I mean. This is the log generated after visiting localhost:5000/new-locale My guess would be this issue has something to do with rendering. Im not sure though. Any insights on how rendering works? Thanks again for helping me out on this! |
The problem might actually be fetching from the database as you suggested because when I try to edit or view more details for a resource, I get this Key error that has something to do with 'locale_id'
|
I wonder if you can get something to record the SQL request sent to server so you can see if "Key Error: locale_id" is coming from the SQL server. If you look at the network activity in the dev tools of a browser, you can see the request and make the request yourself to narrow down the system that needs to be debugged. |
On the chrome console this is what it shows: On the safari console this is what it shows:
|
@dscotese As per the images above, I figured the problem might be in map.js -> The syntax error is because resourcesString is HTML string instead of JSON object. I am not sure why this is the case because in main/views.py the get_resources() function is returning a JSON. I tried messing around with map.js and instead of Another issue is that how can I dynamically change the Any guidance would help a lot, thanks! |
"tlf" means "top level folder." I think the answer might be that I did some things in the .htaccess file on our webserver and I can't remember them. I asked the owner for access just now because the credentials I have don't work. |
Hi @dscotese thanks! I was able to fix the issue. I edited code in map.js and views.py like so main/views.py Now it works ok. Im currently working on creating a GUI way of adding new locales, deleting locales -> and then I would connect them with the API u wrote. |
Thanks for the update! I had hardcoded "national" (right?) as the tlf, and that is my bad. It had to be special because only one particular string, when used as the locale, should return the map of all other locales. I remember the feeling of "probably a bad idea, but who would want to use a string other than 'national' as their top level folder?" I think the owner of resourcemap.org is still struggling a bit with the motivation part of keeping the site alive. I like the maps4all project and glad you found value in it. Hopefully some others will come along and keep it alive too. |
I started documenting what I'm learning about Maps4All in the Wiki on my fork. When that documentation is available through h4i's M4A project (for example, on the Wiki page which currently simply redirects back to the project page), this issue can be closed. Or at any time H4i deems it should be closed, of course :-)
The text was updated successfully, but these errors were encountered: