Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
C
carte-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
carte-facil
Validations
9af9d956
Valider
9af9d956
rédigé
9 years ago
par
Yohan Boniface
Parcourir les fichiers
Options
Téléchargements
Plain Diff
Merge branch 'master' of github.com:umap-project/umap
parents
b0e1d396
608d7485
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
umap/settings/base.py
+3
-0
3 ajouts, 0 suppression
umap/settings/base.py
umap/settings/local.py.sample
+15
-0
15 ajouts, 0 suppression
umap/settings/local.py.sample
umap/views.py
+8
-4
8 ajouts, 4 suppressions
umap/views.py
avec
26 ajouts
et
4 suppressions
umap/settings/base.py
+
3
−
0
Voir le fichier @
9af9d956
...
...
@@ -147,6 +147,9 @@ LEAFLET_STORAGE_EXTRA_URLS = {
}
SITE_URL
=
"
http://umap.org
"
UMAP_DEMO_SITE
=
False
UMAP_EXCLUDE_DEFAULT_MAPS
=
False
UMAP_MAPS_PER_PAGE
=
5
UMAP_MAPS_PER_PAGE_OWNER
=
10
MAP_SHORT_URL_NAME
=
"
umap_short_url
"
UMAP_USE_UNACCENT
=
False
UMAP_FEEDBACK_LINK
=
"
http://wiki.openstreetmap.org/wiki/UMap#Feedback_and_help
"
# noqa
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
umap/settings/local.py.sample
+
15
−
0
Voir le fichier @
9af9d956
...
...
@@ -64,6 +64,16 @@ SOCIAL_AUTH_BACKEND_ERROR_URL = "/"
# UMAP_SHOWCASE_PK = 1156
LEAFLET_STORAGE_ALLOW_ANONYMOUS = True
UMAP_DEMO_SITE = True
# This setting will exclude empty maps (in fact, it will exclude all maps where
# the default center has not been updated)
UMAP_EXCLUDE_DEFAULT_MAPS = False
# How many maps should be showcased on the main page resp. on the user page
UMAP_MAPS_PER_PAGE = 5
# How many maps should be showcased on the user page, if owner
UMAP_MAPS_PER_PAGE_OWNER = 10
SITE_URL = "http://localhost:8019"
SHORT_SITE_URL = "http://s.hort"
...
...
@@ -90,3 +100,8 @@ MEDIA_ROOT = '/home/umap/.virtualenvs/umap/var/uploads'
# MapQuest API key
MAPQUEST_KEY = ''
# Default map location for new maps
LEAFLET_LONGITUDE = 2
LEAFLET_LATITUDE = 51
LEAFLET_ZOOM = 6
Ce diff est replié.
Cliquez pour l'agrandir.
umap/views.py
+
8
−
4
Voir le fichier @
9af9d956
...
...
@@ -54,8 +54,9 @@ class Home(TemplateView, PaginatorMixin):
def
get_context_data
(
self
,
**
kwargs
):
qs
=
Map
.
public
if
'
spatialite
'
not
in
settings
.
DATABASES
[
'
default
'
][
'
ENGINE
'
]:
# Unsupported query type for sqlite.
if
(
settings
.
UMAP_EXCLUDE_DEFAULT_MAPS
and
'
spatialite
'
not
in
settings
.
DATABASES
[
'
default
'
][
'
ENGINE
'
]):
# Unsupported query type for sqlite.
qs
=
qs
.
filter
(
center__distance_gt
=
(
DEFAULT_CENTER
,
D
(
km
=
1
)))
demo_map
=
None
if
hasattr
(
settings
,
"
UMAP_DEMO_PK
"
):
...
...
@@ -74,7 +75,7 @@ class Home(TemplateView, PaginatorMixin):
else
:
qs
=
qs
.
exclude
(
id
=
showcase_map
.
pk
)
maps
=
qs
.
order_by
(
'
-modified_at
'
)[:
50
]
maps
=
self
.
paginate
(
maps
)
maps
=
self
.
paginate
(
maps
,
settings
.
UMAP_MAPS_PER_PAGE
)
return
{
"
maps
"
:
maps
,
...
...
@@ -114,7 +115,10 @@ class UserMaps(DetailView, PaginatorMixin):
manager
=
Map
.
objects
if
owner
else
Map
.
public
maps
=
manager
.
filter
(
Q
(
owner
=
self
.
object
)
|
Q
(
editors
=
self
.
object
))
maps
=
maps
.
distinct
().
order_by
(
'
-modified_at
'
)[:
50
]
per_page
=
10
if
owner
else
self
.
per_page
if
owner
:
per_page
=
settings
.
UMAP_MAPS_PER_PAGE_OWNER
else
:
per_page
=
settings
.
UMAP_MAPS_PER_PAGE
maps
=
self
.
paginate
(
maps
,
per_page
)
kwargs
.
update
({
"
maps
"
:
maps
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter