Permalink
Browse files

Second Commit

  • Loading branch information...
1 parent fdd91c7 commit 8e1b317dbd0a7ff49f755c945a96d60d3962b9e9 @StephenPower committed Jun 20, 2011
Showing 1,633 changed files with 161,431 additions and 0 deletions.
View
@@ -0,0 +1,25 @@
+syntax: glob
+
+media/images
+dev_poc.db
+*.pyc
+\.settings
+auctions-env
+local_settings.py
+s3.cfg
+stores/media/asset/
+
+syntax: regexp
+^dev_poc\.db\.org$
+syntax: regexp
+^local_settings\.py$
+syntax: regexp
+^models\.dot$
+syntax: regexp
+^models\.svg$
+syntax: regexp
+^modelviz\.py$
+syntax: regexp
+^\.pydevproject$
+syntax: regexp
+^\.project$
View
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>GitHub-CollectorCity-Market-Place</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.python.pydev.PyDevBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.python.pydev.pythonNature</nature>
+ </natures>
+</projectDescription>
View
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse-pydev version="1.0"?>
+
+<pydev_project>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
+</pydev_project>
@@ -0,0 +1,5 @@
+#Sun Jun 19 22:50:19 EDT 2011
+eclipse.preferences.version=1
+encoding//stores/cron_past_due.py=utf-8
+encoding//stores/cron_send_daily_invoice.py=utf-8
+encoding//stores/cron_update_bt_payment_status.py=utf-8
View
3 CRONS
@@ -0,0 +1,3 @@
+
+python manage.py cron_fetch_import_images
+
View
34 README
@@ -0,0 +1,34 @@
+
+## Commands to install the proyect
+
+hg clone https://dev.devsar.com/hg/auctions poc
+
+virtualenv --no-site-packages --python=python2.6 auctions-env
+
+pip -E auctions-env install --requirement=auctions/deploy/requirements.txt
+
+source auctions-env/bin/activate
+
+cd poc
+chmod +x manage.py
+# crear db en mysql, editar settings.py
+./manage.py syncdb
+./manage.py runserver
+
+
+### Crons ###
+1) cron_week_topsellert.py
+To get the best seller of the week. run once a week (could be all mondays)
+
+2) cron_send_daily_invoice
+Daily invoices. Cron that sends the invoices to customers... Should be run once a day, every day...
+
+3) cron_past_due.py
+Should be run every day, once a day. It checks which customer do not paid their subscription, send mail to site admins..
+
+
+### RUN SOLR
+java -Dsolr.solr.home=multicore -server -jar start.jar
+
+4) Reindex sorl objects
+python manage.py update_index -a 1
View
No changes.
View
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+"""This is the default wsgi file for the POC project. It's used by Apache's
+mod_wsgi to start the application."""
+
+import os
+import sys
+
+wsgi_path = os.path.abspath(os.path.dirname(__file__))
+# guessing that this .wsgi file is under project/deploy/ directory
+sys.path.append(os.path.join(wsgi_path, "../../auctions-env/lib/python2.6/site-packages/"))
+sys.path.append(os.path.join(wsgi_path, ".."))
+sys.path.append(os.path.join(wsgi_path, "../../"))
+sys.path.append(os.path.join(wsgi_path, "../apps/"))
+
+# we need to setup the DJANGO_SETTINGS_MODULE before doing any import form the
+# django.* namespace:
+os.environ["DJANGO_SETTINGS_MODULE"] = "marketplaces.settings"
+
+import django.core.handlers.wsgi
+application = django.core.handlers.wsgi.WSGIHandler()
View
@@ -0,0 +1,62 @@
+# Only for local development, do not use it in production :P
+# You'll need to enable the following apache2 modules:
+# wsgi, deflate, headers and expires.
+<VirtualHost *:80>
+ ServerName shop.com
+ ServerAlias *.shop.com
+
+ DocumentRoot /home/matagus/projects/sserrano/poc
+ CustomLog /var/log/apache2/poc_access.log combined
+ ErrorLog /var/log/apache2/poc_error.log
+
+ Alias /media /home/matagus/projects/sserrano/poc/media/
+ Alias /admin-media /home/matagus/projects/sserrano/auctions-env/lib/python2.6/site-packages/django/contrib/admin/media/
+
+ <Directory "/home/matagus/projects/sserrano/auctions-env/lib/python2.6/site-packages/django/contrib/admin/">
+ Allow from all
+ </Directory>
+
+ <Directory "/home/matagus/projects/sserrano/auctions-env/lib/python2.6/site-packages/django/contrib/admin/media/">
+ Order Deny,Allow
+ Allow from all
+ AllowOverride None
+ </Directory>
+
+ <Location "/media">
+ SetHandler None
+ ExpiresActive On
+ ExpiresDefault "access plus 1 year"
+ Header unset ETag
+ Header unset Set-Cookie
+ Header set Cache-Control "public, no-transform"
+ Header unset Last-Modified
+ </Location>
+
+ <LocationMatch "^/\.">
+ Order Allow,Deny
+ Deny from all
+ </LocationMatch>
+
+ <LocationMatch "/admin/">
+ Order Deny,Allow
+ Deny from all
+ Allow from 127.0.0.1
+ Satisfy any
+ </LocationMatch>
+
+ WSGIDaemonProcess shop processes=2 threads=10 display-name=%{GROUP
+ WSGIProcessGroup shop
+
+ WSGIScriptAlias / /home/matagus/projects/sserrano/poc/deploy/poc.wsgi
+
+ <IfModule mpm_peruser_module>
+ ServerEnvironment apache apache
+ </IfModule>
+
+ <IfModule mod_deflate.c>
+ <FilesMatch "\.(js|css)$">
+ SetOutputFilter DEFLATE
+ </FilesMatch>
+ </IfModule>
+</VirtualHost>
+
View
@@ -0,0 +1,12 @@
+django>=1.1.1
+MySQL-python
+PIL==1.1.7
+braintree==2.4.0
+django-flash==1.7.2
+gchecky==0.2.1
+boto==1.9b
+pysolr==2.0.12
+django-haystack==1.0.1-final
+Jinja2>=2.5
+httplib2
+coverage
View
@@ -0,0 +1,133 @@
+<?xml version="1.0" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<schema name="default" version="1.1">
+ <types>
+ <fieldtype name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
+ <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
+
+ <!-- Numeric field types that manipulate the value into
+ a string value that isn't human-readable in its internal form,
+ but with a lexicographic ordering the same as the numeric ordering,
+ so that range queries work correctly. -->
+ <fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>
+ <fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/>
+ <fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/>
+ <fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/>
+
+ <fieldType name="date" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>
+
+ <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
+ <analyzer type="index">
+ <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+ <!-- in this example, we will only use synonyms at query time
+ <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
+ -->
+ <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
+ <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
+ <filter class="solr.LowerCaseFilterFactory"/>
+ <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
+ <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
+ </analyzer>
+ <analyzer type="query">
+ <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+ <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
+ <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
+ <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0"/>
+ <filter class="solr.LowerCaseFilterFactory"/>
+ <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
+ <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
+ </analyzer>
+ </fieldType>
+
+ <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
+ <analyzer>
+ <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+ </analyzer>
+ </fieldType>
+ </types>
+
+ <fields>
+ <!-- general -->
+ <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="true"/>
+ <field name="type" type="string" indexed="true" stored="true" multiValued="false" />
+ <field name="name" type="string" indexed="true" stored="true" multiValued="false" />
+
+ <dynamicField name="*_i" type="sint" indexed="true" stored="true"/>
+ <dynamicField name="*_s" type="string" indexed="true" stored="true"/>
+ <dynamicField name="*_l" type="slong" indexed="true" stored="true"/>
+ <dynamicField name="*_t" type="text" indexed="true" stored="true"/>
+ <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
+ <dynamicField name="*_f" type="sfloat" indexed="true" stored="true"/>
+ <dynamicField name="*_d" type="sdouble" indexed="true" stored="true"/>
+ <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
+
+ <field name="django_ct" type="string" indexed="true" stored="true" multiValued="false" />
+ <field name="django_id" type="string" indexed="true" stored="true" multiValued="false" />
+
+
+ <field name="category" type="text" indexed="true" stored="true" multiValued="false" />
+
+ <field name="category_id" type="slong" indexed="true" stored="true" multiValued="false" />
+
+ <field name="ends_at" type="date" indexed="true" stored="true" multiValued="false" />
+
+ <field name="description" type="string" indexed="false" stored="true" multiValued="false" />
+
+ <field name="summary" type="text" indexed="true" stored="true" multiValued="false" />
+
+ <field name="title" type="string" indexed="true" stored="true" multiValued="false" />
+
+ <field name="price" type="sfloat" indexed="true" stored="true" multiValued="false" />
+
+ <field name="product_id" type="slong" indexed="true" stored="true" multiValued="false" />
+
+ <field name="added_at" type="date" indexed="true" stored="true" multiValued="false" />
+
+ <field name="shop_name" type="text" indexed="true" stored="true" multiValued="false" />
+
+ <field name="state" type="text" indexed="true" stored="true" multiValued="false" />
+
+ <field name="shop_id" type="slong" indexed="true" stored="true" multiValued="false" />
+
+ <field name="starts_at" type="date" indexed="true" stored="true" multiValued="false" />
+
+ <field name="subcategory" type="text" indexed="true" stored="true" multiValued="false" />
+
+ <field name="subcategory_id" type="slong" indexed="true" stored="true" multiValued="false" />
+
+ <field name="shop_default_dns" type="string" indexed="false" stored="true" multiValued="false" />
+
+ <field name="marketplace_id" type="slong" indexed="true" stored="true" multiValued="false" />
+
+ <field name="shop_currency" type="string" indexed="false" stored="true" multiValued="false" />
+
+ <field name="image_url" type="text" indexed="false" stored="true" multiValued="false" />
+ </fields>
+
+ <!-- field to use to determine and enforce document uniqueness. -->
+ <uniqueKey>id</uniqueKey>
+
+ <!-- field for the QueryParser to use when an explicit fieldname is absent -->
+ <defaultSearchField>summary</defaultSearchField>
+
+ <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
+ <solrQueryParser defaultOperator="AND" />
+</schema>
+
+
View
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+"""This is the default wsgi file for the POC project. It's used by Apache's
+mod_wsgi to start the application."""
+
+import os
+import sys
+
+wsgi_path = os.path.abspath(os.path.dirname(__file__))
+# guessing that this .wsgi file is under project/deploy/ directory
+sys.path.append(os.path.join(wsgi_path, "../../auctions-env/lib/python2.6/site-packages/"))
+sys.path.append(os.path.join(wsgi_path, ".."))
+sys.path.append(os.path.join(wsgi_path, "../../"))
+sys.path.append(os.path.join(wsgi_path, "../apps/"))
+
+# we need to setup the DJANGO_SETTINGS_MODULE before doing any import form the
+# django.* namespace:
+os.environ["DJANGO_SETTINGS_MODULE"] = "stores.settings"
+
+import django.core.handlers.wsgi
+application = django.core.handlers.wsgi.WSGIHandler()
View
Binary file not shown.
View
No changes.
View
@@ -0,0 +1,3 @@
+from geopy.point import Point
+from geopy.location import Location
+from geopy import geocoders
Oops, something went wrong.

0 comments on commit 8e1b317

Please sign in to comment.