Closed StephenNu closed 10 years ago
Can you give us a diff of the changes relative to the current head?
The following is the diff after doing
git commit -m "finished implementing the search functionallity, and also added support for tests of html pages with arguments in their URLs" git fetch origin git diff origin/master
is this what you wanted?
diff --git a/.gitignore b/.gitignore
index d842df2..8e9abe8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
python
*/__pycache__
+/.idea
diff --git a/.idea/watcherTasks.xml b/.idea/watcherTasks.xml
index e9e3823..f6e673a 100644
--- a/.idea/watcherTasks.xml
+++ b/.idea/watcherTasks.xml
@@ -1,26 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="ProjectTasksOptions">
- <TaskOptions isEnabled="true">
- <option name="arguments" value="--no-cache --update $FileName$:$FileNameWithoutExtension$.css" />
- <option name="checkSyntaxErrors" value="true" />
- <option name="description" value="Compiles .scss files into .css files" />
- <option name="exitCodeBehavior" value="ERROR" />
- <option name="fileExtension" value="scss" />
- <option name="immediateSync" value="true" />
- <option name="name" value="SCSS" />
- <option name="output" value="$FileNameWithoutExtension$.css" />
- <option name="outputFilters">
- <array />
- </option>
- <option name="outputFromStdout" value="false" />
- <option name="passParentEnvs" value="true" />
- <option name="program" value="/usr/bin/scss" />
- <option name="scopeName" value="Project Files" />
- <option name="trackOnlyRoot" value="true" />
- <option name="workingDir" value="$FileDir$" />
- <envs />
- </TaskOptions>
- </component>
-</project>
+<project version="4" />
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..99dd58d
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,703 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ChangeListManager">
+ <list default="true" id="549c3298-9525-4f4a-aebf-ca1b7a251b69" name="Default" comment="">
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.gitignore" afterPath="$PROJECT_DIR$/.gitignore" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/watcherTasks.xml" afterPath="$PROJECT_DIR$/.idea/watcherTasks.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
+ </list>
+ <ignored path="Buchladen.iws" />
+ <ignored path=".idea/workspace.xml" />
+ <option name="TRACKING_ENABLED" value="true" />
+ <option name="SHOW_DIALOG" value="false" />
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+ <option name="LAST_RESOLUTION" value="IGNORE" />
+ </component>
+ <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
+ <component name="CreatePatchCommitExecutor">
+ <option name="PATCH_PATH" value="" />
+ </component>
+ <component name="DaemonCodeAnalyzer">
+ <disable_hints />
+ </component>
+ <component name="DatabaseView">
+ <flatten value="false" />
+ <groupTables value="false" />
+ <sortChildren value="false" />
+ </component>
+ <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
+ <component name="FavoritesManager">
+ <favorites_list name="Buchladen" />
+ </component>
+ <component name="FileEditorManager">
+ <leaf>
+ <file leaf-file-name="book_list.html" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/store/templates/store/book_list.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="57" column="0" selection-start="1502" selection-end="1502" vertical-scroll-proportion="-20.583334" vertical-offset="361" max-vertical-offset="945">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="settings.py" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/Buchladen/settings.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="95" column="48" selection-start="3375" selection-end="3375" vertical-scroll-proportion="0.0" vertical-offset="1425" max-vertical-offset="2730">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="index.html" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/store/templates/store/index.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="31" column="35" selection-start="1011" selection-end="1011" vertical-scroll-proportion="0.7962329" vertical-offset="0" max-vertical-offset="1245">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="auth.html" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/store/templates/store/auth.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="13" column="15" selection-start="400" selection-end="400" vertical-scroll-proportion="-8.125" vertical-offset="0" max-vertical-offset="495">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="results.txt" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/results.txt">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="0" selection-start="0" selection-end="44301" vertical-scroll-proportion="-0.0" vertical-offset="0" max-vertical-offset="14385">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="views.py" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/store/views.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="107" column="67" selection-start="3519" selection-end="3519" vertical-scroll-proportion="0.0" vertical-offset="1605" max-vertical-offset="1695">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="urls.py" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/store/urls.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="18" column="27" selection-start="796" selection-end="796" vertical-scroll-proportion="0.0" vertical-offset="270" max-vertical-offset="420">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="urls.py" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/Buchladen/urls.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="27" column="66" selection-start="1079" selection-end="1222" vertical-scroll-proportion="0.0" vertical-offset="405" max-vertical-offset="570">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="tests.py" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/store/tests.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="36" column="13" selection-start="1295" selection-end="1295" vertical-scroll-proportion="0.0" vertical-offset="540" max-vertical-offset="1290">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name=".gitignore" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/.gitignore">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="1" column="0" selection-start="7" selection-end="7" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="150">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ </leaf>
+ </component>
+ <component name="FindManager">
+ <FindUsagesManager>
+ <setting name="OPEN_NEW_TAB" value="false" />
+ </FindUsagesManager>
+ </component>
+ <component name="Git.Settings">
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+ </component>
+ <component name="GitLogSettings">
+ <option name="myDateState">
+ <MyDateState />
+ </option>
+ </component>
+ <component name="IdeDocumentHistory">
+ <option name="changedFiles">
+ <list>
+ <option value="$PROJECT_DIR$/store/static/books.scss" />
+ <option value="$PROJECT_DIR$/store/models.py" />
+ <option value="$PROJECT_DIR$/docs/DesignOverview.org" />
+ <option value="$PROJECT_DIR$/store/templates/store/index.html" />
+ <option value="$PROJECT_DIR$/Buchladen/settings.py" />
+ <option value="$PROJECT_DIR$/store/static/store/books.scss" />
+ <option value="$PROJECT_DIR$/store/fixtures/test_database.json" />
+ <option value="$PROJECT_DIR$/store/templates/store/search/isbn.html" />
+ <option value="$PROJECT_DIR$/store/templates/store/search/title.html" />
+ <option value="$PROJECT_DIR$/store/templates/store/search/author.html" />
+ <option value="$PROJECT_DIR$/Buchladen/urls.py" />
+ <option value="$PROJECT_DIR$/store/urls.py" />
+ <option value="$PROJECT_DIR$/store/views.py" />
+ <option value="$PROJECT_DIR$/store/tests.py" />
+ <option value="$PROJECT_DIR$/.gitignore" />
+ <option value="$PROJECT_DIR$/results.txt" />
+ </list>
+ </option>
+ </component>
+ <component name="ProjectFrameBounds">
+ <option name="x" value="2" />
+ <option name="y" value="18" />
+ <option name="width" value="10702" />
+ <option name="height" value="5865" />
+ </component>
+ <component name="ProjectInspectionProfilesVisibleTreeState">
+ <entry key="Project Default">
+ <profile-state>
+ <expanded-state>
+ <State>
+ <id />
+ </State>
+ <State>
+ <id>CSS</id>
+ </State>
+ <State>
+ <id>Invalid elementsCSS</id>
+ </State>
+ <State>
+ <id>SASS/SCSS</id>
+ </State>
+ <State>
+ <id>SQL</id>
+ </State>
+ </expanded-state>
+ <selected-state>
+ <State>
+ <id>Buildout</id>
+ </State>
+ </selected-state>
+ </profile-state>
+ </entry>
+ </component>
+ <component name="ProjectLevelVcsManager" settingsEditedManually="true">
+ <OptionsSetting value="true" id="Add" />
+ <OptionsSetting value="true" id="Remove" />
+ <OptionsSetting value="true" id="Checkout" />
+ <OptionsSetting value="true" id="Update" />
+ <OptionsSetting value="true" id="Status" />
+ <OptionsSetting value="true" id="Edit" />
+ <ConfirmationsSetting value="0" id="Add" />
+ <ConfirmationsSetting value="0" id="Remove" />
+ </component>
+ <component name="ProjectReloadState">
+ <option name="STATE" value="0" />
+ </component>
+ <component name="ProjectView">
+ <navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
+ <flattenPackages />
+ <showMembers />
+ <showModules />
+ <showLibraryContents />
+ <hideEmptyPackages />
+ <abbreviatePackageNames />
+ <autoscrollToSource />
+ <autoscrollFromSource />
+ <sortByType />
+ </navigator>
+ <panes>
+ <pane id="Scope" />
+ <pane id="ProjectPane">
+ <subPane>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Buchladen" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Buchladen" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Buchladen" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Buchladen" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Buchladen" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="store" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Buchladen" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Buchladen" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="store" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="templates" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="store" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Buchladen" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="Buchladen" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="polls" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </pane>
+ </panes>
+ </component>
+ <component name="PropertiesComponent">
+ <property name="options.splitter.main.proportions" value="0.2875" />
+ <property name="WebServerToolWindowFactoryState" value="false" />
+ <property name="recentsLimit" value="5" />
+ <property name="options.lastSelected" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
+ <property name="last_opened_file_path" value="$PROJECT_DIR$" />
+ <property name="FullScreen" value="false" />
+ <property name="DefaultHtmlFileTemplate" value="Html5" />
+ <property name="dynamic.classpath" value="false" />
+ <property name="options.splitter.details.proportions" value="0.2" />
+ <property name="options.searchVisible" value="true" />
+ </component>
+ <component name="PyConsoleOptionsProvider">
+ <option name="myPythonConsoleState">
+ <PyConsoleSettings />
+ </option>
+ </component>
+ <component name="RecentsManager">
+ <key name="CopyFile.RECENT_KEYS">
+ <recent name="$PROJECT_DIR$/templates/admin" />
+ </key>
+ <key name="MoveFile.RECENT_KEYS">
+ <recent name="$PROJECT_DIR$/store/static/static" />
+ <recent name="$PROJECT_DIR$/store/static" />
+ <recent name="$PROJECT_DIR$/static" />
+ <recent name="$PROJECT_DIR$/store/templates/store" />
+ </key>
+ </component>
+ <component name="RunManager" selected="Django server.Buchladen">
+ <configuration default="true" type="DjangoTestsConfigurationType" factoryName="Django tests">
+ <option name="INTERPRETER_OPTIONS" value="" />
+ <option name="PARENT_ENVS" value="true" />
+ <envs>
+ <env name="PYTHONUNBUFFERED" value="1" />
+ </envs>
+ <option name="SDK_HOME" value="" />
+ <option name="WORKING_DIRECTORY" value="" />
+ <option name="IS_MODULE_SDK" value="false" />
+ <option name="ADD_CONTENT_ROOTS" value="true" />
+ <option name="ADD_SOURCE_ROOTS" value="true" />
+ <module name="Buchladen" />
+ <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
+ <option name="TARGET" value="" />
+ <option name="SETTINGS_FILE" value="" />
+ <option name="CUSTOM_SETTINGS" value="false" />
+ <option name="USE_OPTIONS" value="false" />
+ <option name="OPTIONS" value="" />
+ <method />
+ </configuration>
+ <configuration default="true" type="tests" factoryName="py.test">
+ <option name="INTERPRETER_OPTIONS" value="" />
+ <option name="PARENT_ENVS" value="true" />
+ <envs />
+ <option name="SDK_HOME" value="" />
+ <option name="WORKING_DIRECTORY" value="" />
+ <option name="IS_MODULE_SDK" value="false" />
+ <option name="ADD_CONTENT_ROOTS" value="true" />
+ <option name="ADD_SOURCE_ROOTS" value="true" />
+ <module name="Buchladen" />
+ <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
+ <option name="SCRIPT_NAME" value="" />
+ <option name="CLASS_NAME" value="" />
+ <option name="METHOD_NAME" value="" />
+ <option name="FOLDER_NAME" value="" />
+ <option name="TEST_TYPE" value="TEST_SCRIPT" />
+ <option name="PATTERN" value="" />
+ <option name="USE_PATTERN" value="false" />
+ <option name="testToRun" value="" />
+ <option name="keywords" value="" />
+ <option name="params" value="" />
+ <option name="USE_PARAM" value="false" />
+ <option name="USE_KEYWORD" value="false" />
+ <method />
+ </configuration>
+ <configuration default="true" type="tests" factoryName="Nosetests">
+ <option name="INTERPRETER_OPTIONS" value="" />
+ <option name="PARENT_ENVS" value="true" />
+ <envs />
+ <option name="SDK_HOME" value="" />
+ <option name="WORKING_DIRECTORY" value="" />
+ <option name="IS_MODULE_SDK" value="false" />
+ <option name="ADD_CONTENT_ROOTS" value="true" />
+ <option name="ADD_SOURCE_ROOTS" value="true" />
+ <module name="Buchladen" />
+ <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
+ <option name="SCRIPT_NAME" value="" />
+ <option name="CLASS_NAME" value="" />
+ <option name="METHOD_NAME" value="" />
+ <option name="FOLDER_NAME" value="" />
+ <option name="TEST_TYPE" value="TEST_SCRIPT" />
+ <option name="PATTERN" value="" />
+ <option name="USE_PATTERN" value="false" />
+ <option name="PARAMS" value="" />
+ <option name="USE_PARAM" value="false" />
+ <method />
+ </configuration>
+ <configuration default="true" type="PythonConfigurationType" factoryName="Python">
+ <option name="INTERPRETER_OPTIONS" value="" />
+ <option name="PARENT_ENVS" value="true" />
+ <envs>
+ <env name="PYTHONUNBUFFERED" value="1" />
+ </envs>
+ <option name="SDK_HOME" value="" />
+ <option name="WORKING_DIRECTORY" value="" />
+ <option name="IS_MODULE_SDK" value="false" />
+ <option name="ADD_CONTENT_ROOTS" value="true" />
+ <option name="ADD_SOURCE_ROOTS" value="true" />
+ <module name="Buchladen" />
+ <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
+ <option name="SCRIPT_NAME" value="" />
+ <option name="PARAMETERS" value="" />
+ <method />
+ </configuration>
+ <configuration default="true" type="Python.DjangoServer" factoryName="Django server">
+ <option name="INTERPRETER_OPTIONS" value="" />
+ <option name="PARENT_ENVS" value="true" />
+ <envs>
+ <env name="PYTHONUNBUFFERED" value="1" />
+ </envs>
+ <option name="SDK_HOME" value="" />
+ <option name="WORKING_DIRECTORY" value="" />
+ <option name="IS_MODULE_SDK" value="false" />
+ <option name="ADD_CONTENT_ROOTS" value="true" />
+ <option name="ADD_SOURCE_ROOTS" value="true" />
+ <module name="Buchladen" />
+ <option name="launchJavascriptDebuger" value="false" />
+ <option name="port" value="8000" />
+ <option name="host" value="" />
+ <option name="additionalOptions" value="" />
+ <option name="browserUrl" value="" />
+ <option name="runTestServer" value="false" />
+ <option name="runNoReload" value="false" />
+ <option name="useCustomRunCommand" value="false" />
+ <option name="customRunCommand" value="" />
+ <method />
+ </configuration>
+ <configuration default="true" type="tests" factoryName="Unittests">
+ <option name="INTERPRETER_OPTIONS" value="" />
+ <option name="PARENT_ENVS" value="true" />
+ <envs />
+ <option name="SDK_HOME" value="" />
+ <option name="WORKING_DIRECTORY" value="" />
+ <option name="IS_MODULE_SDK" value="false" />
+ <option name="ADD_CONTENT_ROOTS" value="true" />
+ <option name="ADD_SOURCE_ROOTS" value="true" />
+ <module name="Buchladen" />
+ <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
+ <option name="SCRIPT_NAME" value="" />
+ <option name="CLASS_NAME" value="" />
+ <option name="METHOD_NAME" value="" />
+ <option name="FOLDER_NAME" value="" />
+ <option name="TEST_TYPE" value="TEST_SCRIPT" />
+ <option name="PATTERN" value="" />
+ <option name="USE_PATTERN" value="false" />
+ <option name="PUREUNITTEST" value="true" />
+ <option name="PARAMS" value="" />
+ <option name="USE_PARAM" value="false" />
+ <method />
+ </configuration>
+ <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug" singleton="true">
+ <method />
+ </configuration>
+ <configuration default="true" type="tests" factoryName="Doctests">
+ <option name="INTERPRETER_OPTIONS" value="" />
+ <option name="PARENT_ENVS" value="true" />
+ <envs />
+ <option name="SDK_HOME" value="" />
+ <option name="WORKING_DIRECTORY" value="" />
+ <option name="IS_MODULE_SDK" value="false" />
+ <option name="ADD_CONTENT_ROOTS" value="true" />
+ <option name="ADD_SOURCE_ROOTS" value="true" />
+ <module name="Buchladen" />
+ <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
+ <option name="SCRIPT_NAME" value="" />
+ <option name="CLASS_NAME" value="" />
+ <option name="METHOD_NAME" value="" />
+ <option name="FOLDER_NAME" value="" />
+ <option name="TEST_TYPE" value="TEST_SCRIPT" />
+ <option name="PATTERN" value="" />
+ <option name="USE_PATTERN" value="false" />
+ <method />
+ </configuration>
+ <configuration default="true" type="tests" factoryName="Attests">
+ <option name="INTERPRETER_OPTIONS" value="" />
+ <option name="PARENT_ENVS" value="true" />
+ <envs />
+ <option name="SDK_HOME" value="" />
+ <option name="WORKING_DIRECTORY" value="" />
+ <option name="IS_MODULE_SDK" value="false" />
+ <option name="ADD_CONTENT_ROOTS" value="true" />
+ <option name="ADD_SOURCE_ROOTS" value="true" />
+ <module name="Buchladen" />
+ <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
+ <option name="SCRIPT_NAME" value="" />
+ <option name="CLASS_NAME" value="" />
+ <option name="METHOD_NAME" value="" />
+ <option name="FOLDER_NAME" value="" />
+ <option name="TEST_TYPE" value="TEST_SCRIPT" />
+ <option name="PATTERN" value="" />
+ <option name="USE_PATTERN" value="false" />
+ <method />
+ </configuration>
+ <configuration default="true" type="com.intellij.persistence.run.ConsoleRunConfigurationType" factoryName="Query Language Console">
+ <option name="VM_PARAMETERS" value="" />
+ <option name="USER_CFG_CLASS" />
+ <option name="CONTEXT_PROVIDER" />
+ <method />
+ </configuration>
+ <configuration default="false" name="Buchladen" type="Python.DjangoServer" factoryName="Django server">
+ <option name="INTERPRETER_OPTIONS" value="" />
+ <option name="PARENT_ENVS" value="true" />
+ <envs>
+ <env name="PYTHONUNBUFFERED" value="1" />
+ <env name="DJANGO_SETTINGS_MODULE" value="Buchladen.settings" />
+ </envs>
+ <option name="SDK_HOME" value="" />
+ <option name="WORKING_DIRECTORY" value="" />
+ <option name="IS_MODULE_SDK" value="false" />
+ <option name="ADD_CONTENT_ROOTS" value="true" />
+ <option name="ADD_SOURCE_ROOTS" value="true" />
+ <module name="Buchladen" />
+ <option name="launchJavascriptDebuger" value="false" />
+ <option name="port" value="8000" />
+ <option name="host" value="" />
+ <option name="additionalOptions" value="" />
+ <option name="browserUrl" value="" />
+ <option name="runTestServer" value="false" />
+ <option name="runNoReload" value="false" />
+ <option name="useCustomRunCommand" value="false" />
+ <option name="customRunCommand" value="" />
+ <RunnerSettings RunnerId="PythonCover" />
+ <RunnerSettings RunnerId="PythonRunner" />
+ <ConfigurationWrapper RunnerId="PythonCover" />
+ <ConfigurationWrapper RunnerId="PythonRunner" />
+ <method />
+ </configuration>
+ <list size="1">
+ <item index="0" class="java.lang.String" itemvalue="Django server.Buchladen" />
+ </list>
+ </component>
+ <component name="ShelveChangesManager" show_recycled="false" />
+ <component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false" SSL_PROTOCOLS="sslv3">
+ <option name="USER" value="" />
+ <option name="PASSWORD" value="" />
+ <option name="mySSHConnectionTimeout" value="30000" />
+ <option name="mySSHReadTimeout" value="30000" />
+ <option name="LAST_MERGED_REVISION" />
+ <option name="MERGE_DRY_RUN" value="false" />
+ <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
+ <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
+ <option name="IGNORE_SPACES_IN_MERGE" value="false" />
+ <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
+ <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
+ <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
+ <option name="FORCE_UPDATE" value="false" />
+ <option name="IGNORE_EXTERNALS" value="false" />
+ <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
+ </component>
+ <component name="TaskManager">
+ <task active="true" id="Default" summary="Default task">
+ <changelist id="549c3298-9525-4f4a-aebf-ca1b7a251b69" name="Default" comment="" />
+ <created>1381459878667</created>
+ <updated>1381459878667</updated>
+ </task>
+ <servers />
+ </component>
+ <component name="ToolWindowManager">
+ <frame x="2" y="18" width="10702" height="5865" extended-state="0" />
+ <editor active="true" />
+ <layout>
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+ <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32804233" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
+ <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32994527" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.28914404" sideWeight="0.6719577" order="0" side_tool="false" content_ui="combo" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+ <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
+ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32991013" sideWeight="0.5" order="8" side_tool="true" content_ui="tabs" />
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.27120823" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32802126" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
+ </layout>
+ </component>
+ <component name="VcsContentAnnotationSettings">
+ <option name="myLimit" value="2678400000" />
+ </component>
+ <component name="VcsManagerConfiguration">
+ <option name="myTodoPanelSettings">
+ <TodoPanelSettings />
+ </option>
+ </component>
+ <component name="XDebuggerManager">
+ <breakpoint-manager />
+ </component>
+ <component name="editorHistoryManager">
+ <entry file="file://$PROJECT_DIR$/store/tests.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="32" column="13" selection-start="1074" selection-end="1074" vertical-scroll-proportion="0.0" vertical-offset="480" max-vertical-offset="1245">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/.gitignore">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="135">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/store/static/store/books.scss">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="10" column="1" selection-start="227" selection-end="227" vertical-scroll-proportion="0.0" vertical-offset="150" max-vertical-offset="2175" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/docs/DesignOverview.org">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="59" column="15" selection-start="1452" selection-end="1452" vertical-scroll-proportion="0.35897437" vertical-offset="633" max-vertical-offset="1365" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/store/fixtures/test_database.json">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="247" column="6" selection-start="14213" selection-end="14213" vertical-scroll-proportion="0.38139534" vertical-offset="3377" max-vertical-offset="4260" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/store/admin.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="5" column="35" selection-start="158" selection-end="158" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="165" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/Buchladen/settings.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="95" column="48" selection-start="3375" selection-end="3375" vertical-scroll-proportion="0.0" vertical-offset="1425" max-vertical-offset="2730">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/Buchladen/urls.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="27" column="66" selection-start="1079" selection-end="1222" vertical-scroll-proportion="0.0" vertical-offset="405" max-vertical-offset="570">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/store/urls.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="18" column="27" selection-start="796" selection-end="796" vertical-scroll-proportion="0.0" vertical-offset="270" max-vertical-offset="420">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/store/views.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="107" column="67" selection-start="3519" selection-end="3519" vertical-scroll-proportion="0.0" vertical-offset="1605" max-vertical-offset="1695">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/store/tests.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="36" column="13" selection-start="1295" selection-end="1295" vertical-scroll-proportion="0.0" vertical-offset="540" max-vertical-offset="1290">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/.gitignore">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="1" column="0" selection-start="7" selection-end="7" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="150">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/store/templates/store/book_list.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="57" column="0" selection-start="1502" selection-end="1502" vertical-scroll-proportion="-20.583334" vertical-offset="361" max-vertical-offset="945">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/store/templates/store/auth.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="13" column="15" selection-start="400" selection-end="400" vertical-scroll-proportion="-8.125" vertical-offset="0" max-vertical-offset="495">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/results.txt">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="0" selection-start="0" selection-end="44301" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="14385">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/store/templates/store/index.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="31" column="35" selection-start="1011" selection-end="1011" vertical-scroll-proportion="0.7962329" vertical-offset="0" max-vertical-offset="1245">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </component>
+</project>
+
diff --git a/Buchladen/settings.py b/Buchladen/settings.py
index 8d3d71d..51e8436 100644
--- a/Buchladen/settings.py
+++ b/Buchladen/settings.py
@@ -88,8 +88,6 @@ STATICFILES_FINDERS = (
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
-STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
-
# Make this unique, and don't share it with anybody.
SECRET_KEY = '-%zwdscoi=scu!d-#ezu0ak#hz(4esiotv@-t&!zq)z(93-((j'
@@ -127,7 +125,6 @@ INSTALLED_APPS = (
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
- #'pipeline',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'polls',
@@ -135,6 +132,17 @@ INSTALLED_APPS = (
# 'rest_framework',
)
+REST_FRAMEWORK = {
+ # Use hyperlinked styles by default.
+ # Only used if the `serializer_class` attribute is not set on a view.
+ 'DEFAULT_MODEL_SERIALIZER_CLASS':
+ 'rest_framework.serializers.HyperlinkedModelSerializer',
+ # Use Django's standard `django.contrib.auth` permissions,
+ # or allow read-only access for unauthenticated users.
+ 'DEFAULT_PERMISSION_CLASSES': [
+ 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
+ ]
+}
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
diff --git a/Buchladen/urls.py b/Buchladen/urls.py
index 9a1529e..e824701 100644
--- a/Buchladen/urls.py
+++ b/Buchladen/urls.py
@@ -21,6 +21,9 @@ urlpatterns = patterns(
url(r'^polls/', include('polls.urls', namespace='polls')),
url(r'^booklist', 'store.views.book_list'),
url(r'^contact-seller', 'store.views.contact_seller'),
+ url(r'^search/isbn/(?P<isbn_number>[^/]+)', 'store.views.isbn'),
+ url(r'^search/author/(?P<author_name>[^/]+)', 'store.views.author'),
+ url(r'^search/title/(?P<title_name>[^/]+)', 'store.views.title'),
# Uncomment the admin/doc line below to enable admin documentation:
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
diff --git a/books.sqlite b/books.sqlite
index 79faf19..b90d125 100644
Binary files a/books.sqlite and b/books.sqlite differ
diff --git a/docs/.gitignore b/docs/.gitignore
index f123b39..b8e914c 100644
--- a/docs/.gitignore
+++ b/docs/.gitignore
@@ -1,4 +1,5 @@
*.html
*.odt
*.pdf
+*.tex
auto
\ No newline at end of file
diff --git a/docs/DesignOverview.org b/docs/DesignOverview.org
index cc1bca3..415ad3b 100644
--- a/docs/DesignOverview.org
+++ b/docs/DesignOverview.org
@@ -78,7 +78,6 @@ DEADLINE: <2013-10-25 Fri>
** Searching for Books
- Search by arbitrary fields
- Sort results after search
-
* Milestone 3
** Administrative User
- Allow admin to remove content from anywhere on the site.
diff --git a/docs/FinalReport.tex b/docs/FinalReport.tex
deleted file mode 100644
index 9bc01fe..0000000
--- a/docs/FinalReport.tex
+++ /dev/null
@@ -1,65 +0,0 @@
-% Created 2013-11-06 Wed 10:27
-\documentclass[11pt]{article}
-\usepackage[utf8]{inputenc}
-\usepackage[T1]{fontenc}
-\usepackage{fixltx2e}
-\usepackage{graphicx}
-\usepackage{longtable}
-\usepackage{float}
-\usepackage{wrapfig}
-\usepackage{soul}
-\usepackage{textcomp}
-\usepackage{marvosym}
-\usepackage{wasysym}
-\usepackage{latexsym}
-\usepackage{amssymb}
-\usepackage{hyperref}
-\tolerance=1000
-\providecommand{\alert}[1]{\textbf{#1}}
-
-\title{Final Report}
-\author{Matt Clifford, Jeff Drake, Jeremy High, Stephen Nusko, Matt Renaud}
-\date{\today}
-
-\begin{document}
-
-\maketitle
-
-\setcounter{tocdepth}{3}
-\tableofcontents
-\vspace*{1cm}
-
-\section{Introduction}
-
-\subsection{Problem Statement}
-
-\subsection{Project Overview}
-
-\subsection{Release Notes Summarizing the Last Transition}
-
-\section{Software Requirements}
-
-\section{Design Specification}
-
-\subsection{Software Architecture (with diagrams)}
-
-\subsection{Sequence Diagrams}
-
-\subsection{Class Diagrams (and their relationships)}
-
-\section{Technical Documentation}
-
-\subsection{Programming Language and Platform}
-
-\subsection{Algorithms, Tools, and Environment}
-
-\subsection{Database Tables and Schema}
-
-\section{User Documentation}
-
-\section{Software Test Plan}
-
-\section{Reference}
-
-
-\end{document}
diff --git a/docs/minutes/2013-10-25-meeting.org b/docs/minutes/2013-10-25-meeting.org
deleted file mode 100644
index c328502..0000000
--- a/docs/minutes/2013-10-25-meeting.org
+++ /dev/null
@@ -1,34 +0,0 @@
-* Group Meeting
-- Start Time :: 4:35
-- End Time :: 7:00
-- Present :: Matt Clifford, Jeff Drake, Jeremy High, Matt Renaud
-- Absent :: Stephen Nusko (Research Meeting)
-
-** Familiarities With Django
-- Matt Clifford and Jeremy High have ...
-- Jeff Drake and Matt Renaud have adequate understanding.
-
-
-** Diagrams To Complete
-- Django flow control.
-- UML class diagram for models.
-- Use case diagrams:
- + Browsing books on home page.
- + Register for an account.
- + Login.
- + Logout.
- + View current postings by user.
- + Add new posting.
- + Edit posting.
- + Remove posting.
- + Search for books.
- + Admin panel.
-- Data flow diagram.
-
-** Pages to Complete
-- Home page
-- Book listing page.
-- Contact user page.
-- User profile page.
-
-** Testing Suite
diff --git a/docs/minutes/2013-10-30-meeting.org b/docs/minutes/2013-10-30-meeting.org
deleted file mode 100644
index ec7acf6..0000000
--- a/docs/minutes/2013-10-30-meeting.org
+++ /dev/null
@@ -1,21 +0,0 @@
-* Group Meeting
-- Start Time :: 4:10
-- End Time :: 4:25
-- Present :: Jeff Drake, Jeremy High, Stephen Nusko, Matt Renaud
-- Absent :: Matt Clifford (In class)
-
-
-** Core Functionality for Prototype
-- Well presented book list.
- + */booklist?orderby=price*
- + */booklist?orderby=-price*
-- Search based on: Title, ISBN, Author
- + */search/isbn/123456789*
- + */search/author/some%20guy*
- + */search/title/some%20title*
-
-
-** Further Use of Redmine
-- Add expected hours to tasks.
-- More usage of site by team members.
-
diff --git a/store/templates/store/index.html b/store/templates/store/index.html
index c1c447d..66beb65 100644
--- a/store/templates/store/index.html
+++ b/store/templates/store/index.html
@@ -1,5 +1,4 @@
{% load staticfiles %}
-
<!DOCTYPE html>
<html lang="en">
<head>
@@ -12,7 +11,7 @@
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
{# <link rel="stylesheet" href="/css/bootstrap.css">#}
<link rel="stylesheet" href="{% static "store/layers.min.css" %}">
- <link rel="stylesheet" href="{{ STATIC_URL}}{% scss "store/books.scss" %}">
+ <link rel="stylesheet" href="{% static "store/books.css" %}">
</head>
<body>
diff --git a/store/templates/store/search/author.html b/store/templates/store/search/author.html
new file mode 100644
index 0000000..5d848e7
--- /dev/null
+++ b/store/templates/store/search/author.html
@@ -0,0 +1,57 @@
+{% load staticfiles %}
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>Author Results</title>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="/css/bootstrap.css" />
+ <link rel="stylesheet" href="{% static "store/layers.min.css" %}" />
+ <link rel="stylesheet" href="{% static "store/books.css" %}" />
+ <link rel="stylesheet" href="{% static "store/booklist.css" %}" />
+ </head>
+ <body>
+ <section class="header">
+ <h1>Buchladen</h1>
+ </section>
+
+ <section class="content">
+ {% for book in book_list %}
+ <div class="book-list-entry">
+ <span class="title"> {{ book.title }} </span>
+
+ <br/>
+ <span class="authors">
+ Authors:
+ {% for author in book.authors.all %}
+ {{ author.name }}
+ {% endfor %}
+ </span>
+
+ <br/>
+ <span class="isbn"> {{ book.isbn }} </span>
+
+ <span class="contact-seller">
+ <a href="/contact-seller/{{ book.user }}" >Contact Seller</a>
+ </span>
+
+
+ <br/>
+ <span class="subjects">
+ Subjects:
+ {% for subject in book.subjects.all %}
+ {{ subject.subject }},
+ {% endfor %}
+ </span>
+
+ <span class="publishers"> {{ book.publisher }} </span>
+
+ <span class="price"> {{ book.price }} </span>
+
+ <br/>
+ <span class="posting-user"> User: {{ book.user }} </span>
+
+ </div>
+ {% endfor %}
+ </content>
+ </body>
+</html>
\ No newline at end of file
diff --git a/store/templates/store/search/isbn.html b/store/templates/store/search/isbn.html
new file mode 100644
index 0000000..eda167c
--- /dev/null
+++ b/store/templates/store/search/isbn.html
@@ -0,0 +1,57 @@
+{% load staticfiles %}
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>Isbn Results</title>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="/css/bootstrap.css" />
+ <link rel="stylesheet" href="{% static "store/layers.min.css" %}" />
+ <link rel="stylesheet" href="{% static "store/books.css" %}" />
+ <link rel="stylesheet" href="{% static "store/booklist.css" %}" />
+ </head>
+ <body>
+ <section class="header">
+ <h1>Buchladen</h1>
+ </section>
+
+ <section class="content">
+ {% for book in book_list %}
+ <div class="book-list-entry">
+ <span class="title"> {{ book.title }} </span>
+
+ <br/>
+ <span class="authors">
+ Authors:
+ {% for author in book.authors.all %}
+ {{ author.name }}
+ {% endfor %}
+ </span>
+
+ <br/>
+ <span class="isbn"> {{ book.isbn }} </span>
+
+ <span class="contact-seller">
+ <a href="/contact-seller/{{ book.user }}" >Contact Seller</a>
+ </span>
+
+
+ <br/>
+ <span class="subjects">
+ Subjects:
+ {% for subject in book.subjects.all %}
+ {{ subject.subject }},
+ {% endfor %}
+ </span>
+
+ <span class="publishers"> {{ book.publisher }} </span>
+
+ <span class="price"> {{ book.price }} </span>
+
+ <br/>
+ <span class="posting-user"> User: {{ book.user }} </span>
+
+ </div>
+ {% endfor %}
+ </content>
+ </body>
+</html>
diff --git a/store/templates/store/search/title.html b/store/templates/store/search/title.html
new file mode 100644
index 0000000..e133ff1
--- /dev/null
+++ b/store/templates/store/search/title.html
@@ -0,0 +1,57 @@
+{% load staticfiles %}
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>Title Results</title>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="/css/bootstrap.css" />
+ <link rel="stylesheet" href="{% static "store/layers.min.css" %}" />
+ <link rel="stylesheet" href="{% static "store/books.css" %}" />
+ <link rel="stylesheet" href="{% static "store/booklist.css" %}" />
+ </head>
+ <body>
+ <section class="header">
+ <h1>Buchladen</h1>
+ </section>
+
+ <section class="content">
+ {% for book in book_list %}
+ <div class="book-list-entry">
+ <span class="title"> {{ book.title }} </span>
+
+ <br/>
+ <span class="authors">
+ Authors:
+ {% for author in book.authors.all %}
+ {{ author.name }}
+ {% endfor %}
+ </span>
+
+ <br/>
+ <span class="isbn"> {{ book.isbn }} </span>
+
+ <span class="contact-seller">
+ <a href="/contact-seller/{{ book.user }}" >Contact Seller</a>
+ </span>
+
+
+ <br/>
+ <span class="subjects">
+ Subjects:
+ {% for subject in book.subjects.all %}
+ {{ subject.subject }},
+ {% endfor %}
+ </span>
+
+ <span class="publishers"> {{ book.publisher }} </span>
+
+ <span class="price"> {{ book.price }} </span>
+
+ <br/>
+ <span class="posting-user"> User: {{ book.user }} </span>
+
+ </div>
+ {% endfor %}
+ </content>
+ </body>
+</html>
\ No newline at end of file
diff --git a/store/tests.py b/store/tests.py
index 13b0c11..f7f0264 100644
--- a/store/tests.py
+++ b/store/tests.py
@@ -9,10 +9,13 @@ from store.urls import urlpatterns
class WebPageTester(TestCase):
-
def test_web_pages(self):
+ argument_pages = ["author", "title", "isbn"]
for url in urlpatterns:
- response = self.client.get(reverse("store.views."+url.name))
+ if url.name in argument_pages:
+ response = self.client.get(reverse("store.views."+url.name, args=['90']))
+ else:
+ response = self.client.get(reverse("store.views."+url.name))
self.assertEqual(response.status_code, 200)
diff --git a/store/urls.py b/store/urls.py
index 6d8ec6d..56ba7c9 100644
--- a/store/urls.py
+++ b/store/urls.py
@@ -10,6 +10,9 @@ urlpatterns = patterns(
url(r'^/login$', views.login_user, name='login_user'),
url(r'^/booklist$', views.book_list, name='book_list'),
url(r'^/contact-seller$', views.contact_seller, name='contact_seller'),
+ url(r'^/search/isbn/(?P<isbn_number>[^/]+)$', views.isbn, name='isbn'),
+ url(r'^/search/author/(?P<author_name>[^/]+)', views.author, name='author'),
+ url(r'^/search/title/(?P<title_name>[^/]+)', views.title, name='title'),
# ex: /polls/5/
#url(r'^(?P<pk>\d+)/$', views.DetailView.as_view(), name='detail'),
# ex: /polls/5/results/
diff --git a/store/views.py b/store/views.py
index 7b501af..c2526b4 100644
--- a/store/views.py
+++ b/store/views.py
@@ -70,6 +70,39 @@ def contact_seller(request):
user = request.GET.get('id', 'NO_USER_SPECIFIED');
return render_to_response('store/contact_seller.html',
{'user': user});
-
-
-
+
+
+def isbn(request, isbn_number):
+ state = "isbn result page"
+ books = []
+ target = isbn_number
+ for book in Book.objects.all():
+ if book.isbn == target:
+ books.append(book)
+ elif "978"+target == book.isbn:
+ books.append(book)
+ return render_to_response('store/search/isbn.html',
+ {'state': state, 'book_list': books})
+
+
+def author(request, author_name):
+ state = "author result page"
+ books = []
+ target = author_name.lower()
+ for book in Book.objects.all():
+ for authors in book.authors.all():
+ if target in authors.name.lower():
+ books.append(book)
+ return render_to_response('store/search/author.html',
+ {'state': state, 'book_list': books})
+
+
+def title(request, title_name):
+ state = "title result page"
+ books = []
+ target = title_name.lower()
+ for book in Book.objects.all():
+ if target in book.title.lower():
+ books.append(book)
+ return render_to_response('store/search/title.html',
+ {'state': state, 'book_list': books})
\ No newline at end of file
I made the appropriate changes, you can pull again.
I completed the search functionality last night, however I couldn't push the code, because when I rebased the code was broken. I did a complete rebase this morning to make sure it wasn't sleep depervation, or some conflict, but with just the code in the repository and no additons it doesn't work. I think it has something to do with the css change over Jeff ( @iaefai )? the error is "Invalid block tag: 'scss'". Matt ( @mrenaud92 ) should I send Jeremy ( @Yuwain ) the relevant files so he can start working on sorting? or will you be able to fix the code jeff? or how do you guys want to proceed since this needs to be done by the iteration end?