Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
85cdf2a9
Commit
85cdf2a9
authored
11 years ago
by
Christophe Matthieu
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] website_event: import GeoIP if GeoIP is not installed
bzr revid: chm@openerp.com-20140327105831-6qwvs32aa6hj3nk2
parent
c1b65898
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
addons/website_event/controllers/main.py
+8
-1
8 additions, 1 deletion
addons/website_event/controllers/main.py
with
8 additions
and
1 deletion
addons/website_event/controllers/main.py
+
8
−
1
View file @
85cdf2a9
...
...
@@ -26,13 +26,20 @@ from openerp.tools.translate import _
from
openerp.addons.website.controllers.main
import
Website
as
controllers
controllers
=
controllers
()
import
logging
_logger
=
logging
.
getLogger
(
__name__
)
from
datetime
import
datetime
,
timedelta
import
time
from
dateutil.relativedelta
import
relativedelta
from
openerp
import
tools
import
werkzeug.urls
import
GeoIP
try
:
import
GeoIP
except
ImportError
:
GeoIP
=
None
_logger
.
warn
(
"
Please install GeoIP python module to use events localisation.
"
)
class
website_event
(
http
.
Controller
):
@http.route
([
'
/event
'
,
'
/event/page/<int:page>
'
],
type
=
'
http
'
,
auth
=
"
public
"
,
website
=
True
,
multilang
=
True
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment