mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-19 12:59:36 +02:00
feat: enhance download command with success and warning messages; update Authentik documentation for clarity
This commit is contained in:
parent
b04a8b8a9e
commit
30f1eaef1c
3 changed files with 10 additions and 3 deletions
|
@ -48,6 +48,7 @@ class Command(BaseCommand):
|
|||
if res.status_code == 200:
|
||||
with open(countries_json_path, 'w') as f:
|
||||
f.write(res.text)
|
||||
self.stdout.write(self.style.SUCCESS('countries+regions+states.json downloaded successfully'))
|
||||
else:
|
||||
self.stdout.write(self.style.ERROR('Error downloading countries+regions+states.json'))
|
||||
return
|
||||
|
@ -56,6 +57,8 @@ class Command(BaseCommand):
|
|||
return
|
||||
elif os.path.getsize(countries_json_path) == 0:
|
||||
self.stdout.write(self.style.ERROR('countries+regions+states.json is empty'))
|
||||
elif Country.objects.count() == 0 or Region.objects.count() == 0 or City.objects.count() == 0:
|
||||
self.stdout.write(self.style.WARNING('Some region data is missing. Re-importing all data.'))
|
||||
else:
|
||||
self.stdout.write(self.style.SUCCESS('Latest country, region, and state data already downloaded.'))
|
||||
return
|
||||
|
|
|
@ -18,6 +18,7 @@ To enable Authentik as an identity provider, the administrator must first config
|
|||
4. Set the `Redirect URI` of type `Regex` to `^http://<adventurelog-server-url>/accounts/oidc/.*$` where `<adventurelog-url>` is the URL of your AdventureLog Server service.
|
||||
5. Copy the `Client ID` and `Client Secret` generated by Authentik, you will need these to configure AdventureLog.
|
||||
6. Create an application in Authentik and assign the provider to it, name the `slug` `adventurelog` or any other name you prefer.
|
||||
7. If you want the logo, you can find it [here](https://adventurelog.app/adventurelog.png).
|
||||
|
||||
### AdventureLog Configuration
|
||||
|
||||
|
@ -41,6 +42,9 @@ This configuration is done in the [Admin Panel](../../guides/admin_panel.md). Yo
|
|||
}
|
||||
```
|
||||
|
||||
::: warning
|
||||
`localhost` is most likely not a valid `server_url` for Authentik in this instance because `localhost` is the server running AdventureLog, not Authentik. You should use the IP address of the server running Authentik or the domain name if you have one.
|
||||
|
||||
- Sites: move over the sites you want to enable Authentik on, usually `example.com` and `www.example.com` unless you renamed your sites.
|
||||
|
||||
#### What it Should Look Like
|
||||
|
|
|
@ -561,8 +561,8 @@
|
|||
}
|
||||
}
|
||||
if (
|
||||
(adventure.is_visited && !reverseGeocodePlace?.region_visited) ||
|
||||
!reverseGeocodePlace?.city_visited
|
||||
adventure.is_visited &&
|
||||
(!reverseGeocodePlace?.region_visited || !reverseGeocodePlace?.city_visited)
|
||||
) {
|
||||
markVisited();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue