See I added datafiles path to .spec file
# -*- mode: python -*-
block_cipher = None
a = Analysis(['..\\mysite\\manage.py'],
pathex=['C:\\Users\\sanjad\\Desktop\\testdemo\\myinstaller'],
binaries=None,
datas=[
(
'C:\\Users\\sanjad\\Desktop\\testdemo\\mysite\\polls\\templates\\',
'polls\\templates'),
(
'C:\\Users\\sanjad\\Desktop\\testdemo\\mysite\\polls\\static\\',
'polls\\static')
],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='manage',
debug=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='manage')
Now when running through exe pyinstaller able to load html files
but not able to load static files
following error I am getting
Enter code here...C:\Users\sanjad\Desktop\testdemo\myinstaller>dist\manage\
manage.exe runserver
Performing system checks...
System check identified no issues (0 silenced).
January 02, 2017 - 19:10:14
Django version 1.10.2, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[02/Jan/2017 19:10:20] "GET / HTTP/1.1" 200 346
Not Found: /static/polls/style.css
[02/Jan/2017 19:10:20] "GET /static/polls/style.css HTTP/1.1" 404 2605
On Monday, January 2, 2017 at 3:45:41 PM UTC+5:30, Hartmut Goebel wrote:
>
> Am 02.01.2017 um 05:27 schrieb ragini dahihande:
>
> I am not able to find any question for this in FAQ.
>
>
> I have to admit that the FAQ does not answer the question. The manual
> does:
> <https://pyinstaller.readthedocs.io/en/stable/spec-files.html#adding-files-to-the-bundle>
>
> <https://pyinstaller.readthedocs.io/en/stable/spec-files.html#adding-files-to-the-bundle>
>
> --
> Schönen Gruß
> Hartmut Goebel
> Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
> Information Security Management, Security Governance, Secure Software
> Development
>
> Goebel Consult, Landshut
> http://www.goebel-consult.de
>
> Blog:
> http://www.goebel-consult.de/blog/k-9-mail-statt-apps-der-mailprovider
> Kolumne: http://www.cissp-gefluester.de/2010-07-passwoerter-lieben-lernen
>
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.