Jet Admin Backend Prob with Google Analytics

180 views
Skip to first unread message

Michael Schintler

unread,
Jul 14, 2016, 11:29:38 AM7/14/16
to Django users
Hi all ,

I m sorry but new to Django and after some learning i came to Jet Admin Backend. All works fine excepting the "Google Analytics Widget".
Could anybody help me ?

I folowed absolutly this link https://github.com/geex-arts/django-jet/blob/master/docs/dashboard_modules.rst

but it s a prob with my Document root . When i set the absolute path to the client_secrets.json i become this output

 File "/home/developer/webapps/machine2/django/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 662, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/home/developer/webapps/machine2/django/pressmedia/pm/settings.py", line 4, in <module>
    JET_MODULE_GOOGLE_ANALYTICS_CLIENT_SECRETS_FILE = os.path.join(PROJECT_DIR, '/home/developer/webapps/machine2/django/pressmedia/client_secrets.json')
NameError: name 'PROJECT_DIR' is not defined


Thanks a lot if someone has an answer for me.

ludovic coues

unread,
Jul 14, 2016, 12:30:36 PM7/14/16
to django...@googlegroups.com
You have no variable named PROJECT_DIR your file pressmedia/pm/settings.py.
You might want to remove os.path.join as you already specify the full path.
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f8f30a8d-a3b4-45b5-ab24-39c0251eaa95%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--

Cordialement, Coues Ludovic
+336 148 743 42

Michael Schintler

unread,
Jul 15, 2016, 5:46:11 AM7/15/16
to Django users
Thank U very much solved the prob by

Troque:
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))


PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))


So it works now. But the widget for GoogleAnalytics still not. I will find and solve that ;)

But thx U helped me a lot.

Reply all
Reply to author
Forward
0 new messages