So i'm doing a python package for my dissertation with the following structure:
├── dist
│ └── segtest-0.0.8.tar.gz
├── README.md
├── result
├── setup.py
├── src
│ ├── segmentation
│ │ ├── data
│ │ │ ├── atlas_flargas
│ │ │ │ ├── atlas_info.txt
│ │ │ │ └── bundles
│ │ │ │ ├── atlas_AR_ANT_LEFT_MNI.bundles
│ │ │ │ ├── atlas_AR_ANT_LEFT_MNI.bundlesdata
│ │ │ │ ├── atlas_AR_ANT_RIGHT_MNI.bundles
│ │ │ │ ├── atlas_AR_ANT_RIGHT_MNI.bundlesdata
│ │ │ │ └── ... (there is about 10k of these)
│ │ │ ├── atlas_fshort
│ │ │ │ ├── atlasInfo_left.txt
│ │ │ │ ├── atlasInfo_right.txt
│ │ │ │ ├── Left_Bundles
│ │ │ │ │ ├── atlas_lh_CMF_CMF_0i_MNI.bundles
│ │ │ │ │ ├── atlas_lh_CMF_CMF_0i_MNI.bundlesdata
│ │ │ │ │ ├── ... (lots of these files)
│ │ │ │ └── Right_Bundles
│ │ │ │ ├── atlas_rh_CMF_CMF_0i_MNI.bundles
│ │ │ │ ├── atlas_rh_CMF_CMF_0i_MNI.bundlesdata
│ │ │ │ ├── ... (lots of these files)
│ │ │ └── subjects
│ │ │ ├── 118225
│ │ │ │ ├── 118225.bundles
│ │ │ │ ├── 118225.bundlesdata
│ │ │ │ └── 118225_nqac.nii
│ │ │ ├── 157336
│ │ │ │ ├── 157336.bundles
│ │ │ │ ├── 157336.bundlesdata
│ │ │ │ └── 157336_nqac.nii
│ │ │ └── 157437
│ │ │ ├── 157437.bundles
│ │ │ ├── 157437.bundlesdata
│ │ │ └── 157437_nqac.nii
│ │ ├── fibras_segmentation.py
│ │ ├── __init__.py
│ │ ├── main
│ │ └── main.cpp
│ └── segtest.egg-info
│ ├── dependency_links.txt
│ ├── PKG-INFO
│ ├── SOURCES.txt
│ └── top_level.txt
└── tests
├── MANIFEST.in
└── pyproject.toml
I'm trying to include the entire data directory + main.cpp and hopefully, keeping it's structure, to a wheel distribution since, to my understanding, it is a faster and more user friendly distribution.
I managed to include both the data directory and the main.cpp file with the source dist by using a MANIFEST.in + include_package_data = True in my setup.py, but it seems like MANIFEST.in is ignored when building a wheel dist. Thus, why i've hid it under the tests directory, for the sake of testing other methods for the wheel dist.
I also tried using different setuptools.setup options, like:
package_dir = {"": "src"},
packages = setuptools.find_packages(where="src"),
include_package_data = True,
data_files = [('data/atlas_flargas/bundles',['src/segmentation/data/atlas_flargas/bundles/*'])]
using package_data and have looked through other similar questions, however, all to no avail, since i haven't managed to include any data file whatsoever. I'm very unsure as to how to do this, since i'm very new to the python packaging world. Is it possible to add a whole set of data files (10k+ files) to a wheel distribution? Should i just go for the source distribution for these requirements?
Related
I'm using PyCharm and often rely on the alt+enter shortcut to automatically import classes and functions.
However, it doesn't use the absolute import path. It works fine locally but when I push to GitHub my tests fail in TravisCI.
Does anyone know a way to force PyCharm to import with the absolute path?
I need to import like this drone_squadron.api.drone_api if I use something like this api.drone_api the remote tests can't find the import. This is for all local imports.
I'd prefer for all imports to be absolute, all the time. Relative imports have caused me problems in packaging up projects. I think it's just easier to use absolute imports all the time.
Git Repo
https://github.com/sarcoma/drone_squadron_api_prototype
Tree Structure
.
├── coverage.xml
├── LICENSE.md
├── pytest.ini
├── README.md
├── requirements.txt
├── drone_squadron
│ ├── app.py
│ ├── endpoints.http
│ ├── flask.cfg
│ ├── __init__.py
│ ├── load_fixtures.py
│ ├── main.py
│ ├── router.py
│ ├── schema.py
│ ├── test_flask.cfg
│ ├── api
│ │ ├── base_api.py
│ │ ├── drone_api.py
│ │ ├── gimbal_api.py
│ │ ├── __init__.py
│ │ ├── price_api.py
│ │ ├── round_type_api.py
│ │ ├── scanner_api.py
│ │ ├── squadron_api.py
│ │ ├── steering_api.py
│ │ ├── thruster_api.py
│ │ ├── user_api.py
│ │ └── weapon_api.py
│ ├── authentication
│ │ ├── __init__.py
│ │ └── login.py
│ ├── crud
│ │ ├── base_crud.py
│ │ ├── drone_crud.py
│ │ ├── gimbal_crud.py
│ │ ├── __init__.py
│ │ ├── item_crud.py
│ │ ├── price_crud.py
│ │ ├── round_type_crud.py
│ │ ├── scanner_crud.py
│ │ ├── squadron_crud.py
│ │ ├── status_crud.py
│ │ ├── steering_crud.py
│ │ ├── thruster_crud.py
│ │ ├── user_crud.py
│ │ └── weapon_crud.py
│ ├── database
│ │ ├── database.py
│ │ ├── drones.db
│ │ ├── drones_test.db
│ │ └── __init__.py
│ ├── enums
│ │ ├── __init__.py
│ │ ├── round_type.py
│ │ └── status.py
│ ├── error
│ │ ├── error.py
│ │ └── __init__.py
│ ├── fixtures
│ │ ├── gimbal_fixtures.py
│ │ ├── __init__.py
│ │ ├── round_type_fixtures.py
│ │ ├── scanner_fixtures.py
│ │ ├── status_fixtures.py
│ │ ├── steering_fixtures.py
│ │ ├── thruster_fixtures.py
│ │ ├── user_fixtures.py
│ │ └── weapon_fixtures.py
│ ├── model
│ │ ├── base_model.py
│ │ ├── drone_model.py
│ │ ├── __init__.py
│ │ └── squadron_model.py
│ ├── request
│ │ ├── __init__.py
│ │ └── json_request_handler.py
│ ├── response
│ │ ├── __init__.py
│ │ └── json_response.py
│ ├── service
│ │ └── calculate_cost.py
│ ├── transformer
│ │ ├── __init__.py
│ │ ├── json_transformer.py
│ │ └── transformer.py
│ └── validation
│ ├── abstract
│ │ ├── __init__.py
│ │ └── validation_abstract.py
│ ├── drone_validation.py
│ ├── field.py
│ ├── __init__.py
│ ├── validation_link.py
│ └── validations.py
└── tests
├── drones_test.db
├── __init__.py
├── test_api
│ ├── conftest.py
│ ├── __init__.py
│ ├── test_auth.py
│ ├── test_drone.py
│ ├── test_gimbal.py
│ ├── test_price_list.py
│ ├── test_round_type.py
│ ├── test_scanner.py
│ ├── test_squadron.py
│ ├── test_steering.py
│ ├── test_thruster.py
│ └── test_weapon.py
└── test_crud
├── conftest.py
├── __init__.py
├── test_drone_crud.py
├── test_gimbal_crud.py
├── test_scanner_crud.py
├── test_squadron_crud.py
├── test_status_crud.py
├── test_steering_crud.py
├── test_thruster_crud.py
├── test_user_crud.py
└── test_weapon_crud.py
In Python, imports can be relative or absolute.
Absolute imports are resolved from your project's root directory:
import drone_squadron.api.drone_api
Relative imports are resolved from the current python package.
import ..api.drone
In your case, the issue is NOT a relative/absolute confusion, PyCharm always add absolute imports.
The problem is that PyCharm probably consider the folder drone_squadron in your project as a "root directory". That's wrong! The root directory is the top-level folder corresponding to the whole git project (the folder containing LICENSE.md, README.md, etc.)
In PyCharm, right click on the folder drone_squadron, then open sub-menu Mark directory as (in the bottom) then select Unmark as Source Root.
After that action, your import will be added the way you want.
So I was wondering what it would take to get Sphinx to auto gen some documentation in my __main__.py, so far I just can't seem to make it work. I've got some other python files that will auto gen some stuff just fine.
inside __main__.py
import os
def main():
"""
Some helpful stuff about main
"""
def function_1(stuff):
"""
Some helpful stuff about function_1
"""
pass
def function_2(things):
"""
Some helpful stuff about function_2
"""
pass
print(function_1())
print(function_2())
do_the_other_code_dot_jpg()
return 0
if __name__ == '__main__':
main()
Inside of index.rst
Welcome to Some Test Docs
=========================
This is some test text.
.. toctree::
:maxdepth: 2
:caption: Contents:
code
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
inside of code.rst
Report
======
.. automodule:: __main__
:members:
A tree of current directory structure
Sphinx/
├── doc
│ ├── _build
│ │ ├── doctrees
│ │ │ ├── code.doctree
│ │ │ ├── environment.pickle
│ │ │ └── index.doctree
│ │ └── html
│ │ ├── code.html
│ │ ├── genindex.html
│ │ ├── index.html
│ │ ├── objects.inv
│ │ ├── py-modindex.html
│ │ ├── search.html
│ │ ├── searchindex.js
│ │ ├── _sources
│ │ │ ├── code.rst.txt
│ │ │ └── index.rst.txt
│ │ └── _static
│ │ ├── ajax-loader.gif
│ │ ├── alabaster.css
│ │ ├── basic.css
│ │ ├── comment-bright.png
│ │ ├── comment-close.png
│ │ ├── comment.png
│ │ ├── custom.css
│ │ ├── doctools.js
│ │ ├── down.png
│ │ ├── down-pressed.png
│ │ ├── file.png
│ │ ├── jquery-3.1.0.js
│ │ ├── jquery.js
│ │ ├── minus.png
│ │ ├── plus.png
│ │ ├── pygments.css
│ │ ├── searchtools.js
│ │ ├── underscore-1.3.1.js
│ │ ├── underscore.js
│ │ ├── up.png
│ │ ├── up-pressed.png
│ │ └── websupport.js
│ ├── code.rst
│ ├── conf.py
│ ├── index.rst
│ ├── Makefile
│ ├── _static
│ └── _templates
└── __main__.py
Here is an image of the index page
Here is an image of the __main__ module
I am building a package to upload as an AWS Lambda function. In trying to include a dependency to Markdown 2.6.8, a python implementation of Markdown. When trying to test the function, I get the error Unable to import module 'markdown-convert': No module named markdown. I see from other similar questions that I may need to compile the dependency files inside Amazon Linux to make them usable with Lambda. I am not familiar with python and wonder if I should also be exploring the way that this code is packaged within an egg, and whether that influences how the dependency is imported. What would you suggest I pursue to try to resolve the error?
Here is the file structure of my package:
.
├── markdown
│ ├── blockparser.py
│ ├── blockprocessors.py
│ ├── extensions
│ │ ├── abbr.py
│ │ ├── admonition.py
│ │ ├── attr_list.py
│ │ ├── codehilite.py
│ │ ├── def_list.py
│ │ ├── extra.py
│ │ ├── fenced_code.py
│ │ ├── footnotes.py
│ │ ├── headerid.py
│ │ ├── __init__.py
│ │ ├── meta.py
│ │ ├── nl2br.py
│ │ ├── __pycache__
│ │ │ ├── abbr.cpython-34.pyc
│ │ │ ├── admonition.cpython-34.pyc
│ │ │ ├── attr_list.cpython-34.pyc
│ │ │ ├── codehilite.cpython-34.pyc
│ │ │ ├── def_list.cpython-34.pyc
│ │ │ ├── extra.cpython-34.pyc
│ │ │ ├── fenced_code.cpython-34.pyc
│ │ │ ├── footnotes.cpython-34.pyc
│ │ │ ├── headerid.cpython-34.pyc
│ │ │ ├── __init__.cpython-34.pyc
│ │ │ ├── meta.cpython-34.pyc
│ │ │ ├── nl2br.cpython-34.pyc
│ │ │ ├── sane_lists.cpython-34.pyc
│ │ │ ├── smart_strong.cpython-34.pyc
│ │ │ ├── smarty.cpython-34.pyc
│ │ │ ├── tables.cpython-34.pyc
│ │ │ ├── toc.cpython-34.pyc
│ │ │ └── wikilinks.cpython-34.pyc
│ │ ├── sane_lists.py
│ │ ├── smart_strong.py
│ │ ├── smarty.py
│ │ ├── tables.py
│ │ ├── toc.py
│ │ └── wikilinks.py
│ ├── __init__.py
│ ├── inlinepatterns.py
│ ├── __main__.py
│ ├── odict.py
│ ├── postprocessors.py
│ ├── preprocessors.py
│ ├── __pycache__
│ │ ├── blockparser.cpython-34.pyc
│ │ ├── blockprocessors.cpython-34.pyc
│ │ ├── __init__.cpython-34.pyc
│ │ ├── inlinepatterns.cpython-34.pyc
│ │ ├── __main__.cpython-34.pyc
│ │ ├── odict.cpython-34.pyc
│ │ ├── postprocessors.cpython-34.pyc
│ │ ├── preprocessors.cpython-34.pyc
│ │ ├── serializers.cpython-34.pyc
│ │ ├── treeprocessors.cpython-34.pyc
│ │ ├── util.cpython-34.pyc
│ │ └── __version__.cpython-34.pyc
│ ├── serializers.py
│ ├── treeprocessors.py
│ ├── util.py
│ └── __version__.py
├── Markdown-2.6.8.egg-info
│ ├── dependency_links.txt
│ ├── installed-files.txt
│ ├── PKG-INFO
│ ├── SOURCES.txt
│ └── top_level.txt
└── markdown-convert.py
The contents of markdown-convert.py:
import markdown
def lambda_handler(event, context):
parsedHTML = {}
parsedHTML[u'text'] = markdown.markdown(event[u'text'])
return parsedHTML
Best advice here is to use virtualenv on your local development machine and install packages with pip.
Then when you are ready, make the lambda package by recursively copying the entire content of <your-virtual-env>/lib/python2.7/site-packages/*. Make sure the content is placed in the root of your zip package. This is very important!
Please, find more details here:
http://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
I am trying to set IMAGES_STORE as a relative path but i am getting error and if i am specifying IMAGES_STORE as a Full path it is working fine /home/vaibhav/scrapyprog/comparison/eScraperInterface/images
Error i am getting is at link
Actually it is giving me RuntimeError: OSError: [Errno 20] Not a directory: '/tmp/eScraper-1371463750-Lm8HLh.egg/images' error but if i set Full IMAGE_STORE path it is working fine can someone tell me how can i specify relative path...as i need to deploy this project at various system ...that's why i need relative path....
import os
#------------------------------------------------------------------------------
projectDirPath = os.path.abspath(os.path.dirname((os.path.dirname(__file__))))
imagesDIRPath = projectDirPath + "/images"
BOT_NAME = 'eScraper'
DOWNLOADER_DEBUG = True
CONCURRENT_REQUESTS = 200
AUTOTHROTTLE_DEBUG = True
AUTOTHROTTLE_ENABLED= True
DEPTH_STATS_VERBOSE = True
SPIDER_MODULES = ['eScraper.spiders']
NEWSPIDER_MODULE = 'eScraper.spiders'
COMMANDS_MODULE = 'eScraper.commands'
ITEM_PIPELINES = ['eScraper.pipelines.EscraperPipeline',
'eScraper.pipelines.MySQLStorePipeline']
IMAGES_STORE = imagesDIRPath
DOWNLOADER_MIDDLEWARES = {
'eScraper.rotate_useragent.RotateUserAgentMiddleware' :400,
'scrapy.contrib.downloadermiddleware.useragent.UserAgentMiddleware' : None
}
#------------------------------------------------------------------------------
My project structure:
├── eScraperInterface
│ ├── build
│ │ ├── bdist.linux-i686
│ │ └── lib.linux-i686-2.7
│ │ ├── eScraper
│ │ │ ├── commands
│ │ │ │ ├── __init__.py
│ │ │ │ └── runAllSpiders.py
│ │ │ ├── __init__.py
│ │ │ ├── items.py
│ │ │ ├── pipelines.py
│ │ │ ├── rotate_useragent.py
│ │ │ ├── settings.py
│ │ │ ├── spiders
│ │ │ └── userAgentList.py
│ │ ├── eScraperInterface
│ │ │ ├── __init__.py
│ │ │ ├── settings.py
│ │ │ ├── urls.py
│ │ │ └── wsgi.py
│ │ └── eScraperInterfaceApp
│ │ ├── __init__.py
│ │ ├── models.py
│ │ ├── tests.py
│ │ └── views.py
│ ├── checkImageExist.py
│ ├── eScraper
│ │ ├── commands
│ │ │ ├── __init__.py
│ │ │ ├── __init__.pyc
│ │ │ ├── runAllSpiders.py
│ │ │ └── runAllSpiders.pyc
│ │ ├── __init__.py
│ │ ├── __init__.pyc
│ │ ├── items.py
│ │ ├── items.pyc
│ │ ├── pipelines.py
│ │ ├── pipelines.pyc
│ │ ├── rotate_useragent.py
│ │ ├── rotate_useragent.pyc
│ │ ├── settings.py
│ │ ├── settings.py~
│ │ ├── settings.pyc
│ │ ├── spiders
│ │ ├── userAgentList.py
│ │ └── userAgentList.pyc
│ ├── eScraperInterface
│ │ ├── __init__.py
│ │ ├── __init__.pyc
│ │ ├── settings.py
│ │ ├── settings.pyc
│ │ ├── urls.py
│ │ ├── urls.pyc
│ │ ├── wsgi.py
│ │ └── wsgi.pyc
│ ├── eScraperInterfaceApp
│ │ ├── __init__.py
│ │ ├── __init__.pyc
│ │ ├── models.py
│ │ ├── models.py~
│ │ ├── models.pyc
│ │ ├── tests.py
│ │ └── views.py
│ ├── images
│ ├── __init__.py
│ ├── manage.py
│ ├── project.egg-info
│ │ ├── dependency_links.txt
│ │ ├── entry_points.txt
│ │ ├── PKG-INFO
│ │ ├── SOURCES.txt
│ │ └── top_level.txt
│ ├── scrapy.cfg
│ └── setup.py
├── README.txt
└── README.txt~
Assuming you've provided settings.py from eScraperInterface/eScraper/settings.py:
CUR_DIR = os.path.dirname(os.path.realpath(__file__))
IMAGES_STORE = os.path.join(CUR_DIR, '..', 'images')
Hope that helps.
I have configured a linode server with apache2 and mod_wsgi..
the server is running
wsgi is running
postgre is running and syncdb was successful
what I am having trouble finishing is actually serving the app..
my file structure:
.
├── logfile
└── srv
├── logfile
└── www
└── quickerhub.com
├── admin
│ ├── css
│ │ ├── base.css
│ │ ├── changelists.css
│ │ ├── dashboard.css
│ │ ├── forms.css
│ │ ├── ie.css
│ │ ├── login.css
│ │ ├── rtl.css
│ │ └── widgets.css
│ ├── img
│ │ ├── changelist-bg.gif
│ │ ├── changelist-bg_rtl.gif
│ │ ├── chooser-bg.gif
│ │ ├── chooser_stacked-bg.gif
│ │ ├── default-bg.gif
│ │ ├── default-bg-reverse.gif
│ │ ├── deleted-overlay.gif
│ │ ├── gis
│ │ │ ├── move_vertex_off.png
│ │ │ └── move_vertex_on.png
│ │ ├── icon_addlink.gif
│ │ ├── icon_alert.gif
│ │ ├── icon_calendar.gif
│ │ ├── icon_changelink.gif
│ │ ├── icon_clock.gif
│ │ ├── icon_deletelink.gif
│ │ ├── icon_error.gif
│ │ ├── icon-no.gif
│ │ ├── icon_searchbox.png
│ │ ├── icon_success.gif
│ │ ├── icon-unknown.gif
│ │ ├── icon-yes.gif
│ │ ├── inline-delete-8bit.png
│ │ ├── inline-delete.png
│ │ ├── inline-restore-8bit.png
│ │ ├── inline-restore.png
│ │ ├── inline-splitter-bg.gif
│ │ ├── nav-bg.gif
│ │ ├── nav-bg-grabber.gif
│ │ ├── nav-bg-reverse.gif
│ │ ├── nav-bg-selected.gif
│ │ ├── selector-icons.gif
│ │ ├── selector-search.gif
│ │ ├── sorting-icons.gif
│ │ ├── tool-left.gif
│ │ ├── tool-left_over.gif
│ │ ├── tool-right.gif
│ │ ├── tool-right_over.gif
│ │ ├── tooltag-add.gif
│ │ ├── tooltag-add_over.gif
│ │ ├── tooltag-arrowright.gif
│ │ └── tooltag-arrowright_over.gif
│ └── js
│ ├── actions.js
│ ├── actions.min.js
│ ├── admin
│ │ ├── DateTimeShortcuts.js
│ │ ├── ordering.js
│ │ └── RelatedObjectLookups.js
│ ├── calendar.js
│ ├── collapse.js
│ ├── collapse.min.js
│ ├── core.js
│ ├── getElementsBySelector.js
│ ├── inlines.js
│ ├── inlines.min.js
│ ├── jquery.init.js
│ ├── jquery.js
│ ├── jquery.min.js
│ ├── LICENSE-JQUERY.txt
│ ├── prepopulate.js
│ ├── prepopulate.min.js
│ ├── SelectBox.js
│ ├── SelectFilter2.js
│ ├── timeparse.js
│ └── urlify.js
├── interest
│ ├── django.wsgi
│ ├── __init__.py
│ ├── __init__.pyc
│ ├── settings.py
│ ├── settings.pyc
│ ├── urls.py
│ └── wsgi.py
├── js
│ └── jquery-1.10.1.min.js
├── logfile
├── manage.py
├── README
├── reoccurring
│ ├── admin.py
│ ├── forms.py
│ ├── __init__.py
│ ├── __init__.pyc
│ ├── models.py
│ ├── models.pyc
│ ├── usagelib.py
│ └── views.py
├── schedule
│ ├── admin.py
│ ├── __init__.py
│ ├── __init__.pyc
│ ├── models.py
│ ├── models.pyc
│ ├── tests.py
│ ├── usagelib.py
│ └── views.py
├── src
│ ├── facebooksdk
│ │ ├── examples
│ │ │ ├── appengine
│ │ │ │ ├── app.yaml
│ │ │ │ ├── example.html
│ │ │ │ └── example.py
│ │ │ ├── newsfeed
│ │ │ │ ├── app.yaml
│ │ │ │ ├── facebookclient.py
│ │ │ │ ├── static
│ │ │ │ │ ├── base.css
│ │ │ │ │ ├── favicon.ico
│ │ │ │ │ └── robots.txt
│ │ │ │ └── templates
│ │ │ │ ├── base.html
│ │ │ │ ├── home.html
│ │ │ │ └── index.html
│ │ │ ├── oauth
│ │ │ │ ├── app.yaml
│ │ │ │ ├── facebookoauth.py
│ │ │ │ └── oauth.html
│ │ │ └── tornado
│ │ │ ├── example.html
│ │ │ ├── example.py
│ │ │ └── schema.sql
│ │ ├── facebook.py
│ │ ├── facebook_sdk.egg-info
│ │ │ ├── dependency_links.txt
│ │ │ ├── PKG-INFO
│ │ │ ├── SOURCES.txt
│ │ │ └── top_level.txt
│ │ ├── MANIFEST.in
│ │ ├── README.rst
│ │ └── setup.py
│ └── pip-delete-this-directory.txt
├── static
│ └── js
│ └── jquery-1.10.1.min.js
├── templates
│ ├── 404.html
│ ├── 500.html
│ ├── Base.html
│ ├── Home.html
│ ├── Reoccurring.html
│ └── Usersettings.html
└── usersetting
├── admin.py
├── __init__.py
├── __init__.pyc
├── models.py
├── models.pyc
└── views.py
my django.wsgi:
import os
import sys
sys.path.append('/srv/www/quickerhub.com/')
os.environ['PYTHON_EGG_CACHE'] = '/srv/www/quickerhub.com.python-egg'
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
my httpd.conf:
my sites-enabled/quickerhub.com:
WSGIPythonPath /srv/www/quickerhub.com
<VirtualHost *:80>
ServerName quickerhub.com
Alias /static/ /srv/www/quickerhub.com/interest/static/
WSGIScriptAlias / /srv/www/quickerhub.com/interest/django.wsgi
<Directory />
AllowOverride None
Options -Indexes
</Directory>
</VirtualHost>
I feel like everything is pointing to the correct stuff...
EDIT:
Now just getting a 404 file not found
Please help!
Thanks!
I just setup my site www.noobniche.com on Linode using WSGI. Unfortunately I'm not at home to compare my setup, if you're still having problems tonight I can look into it. From memory in my case, I had to enable by adding to sites-enabled and sites-available.
the structure should look something similar to this;
webapps(root directory)
nichesite
static
django_project_name
--> myproject.wsgi
--> settings.py
--> urls.py
--> views.py
manage.py
it seems your .wsgi file is located in your root directory, when it should be located within your django project folder.
So it looks as if you have conflicting settings for WSGIScriptAlias - one in httpd.conf, pointing to the right path for your wsgi file, and one in your sites-enabled file, pointing to the wrong path (/var/ instead of /srv/).
You should remove the one in httpd.conf and move it to sites-enabled/quickerhub.com so that the version there is correctly pointing to /srv/.