Commit c114ca4b authored by Nicolas Chauvat's avatar Nicolas Chauvat
Browse files

here is a stub.

parents
include *.py
recursive-include data external_resources *.gif *.png *.css *.ico *.js
recursive-include i18n *.pot *.po
recursive-include migration *.py
"""cubicweb-classifiedad application package
classified ad
"""
# pylint: disable-msg=W0622
"""cubicweb-classifiedad application packaging information"""
modname = 'classifiedad'
distname = 'cubicweb-classifiedad'
numversion = (0, 1, 0)
version = '.'.join(str(num) for num in numversion)
license = 'LCL'
copyright = '''Copyright (c) 2010 LOGILAB S.A. (Paris, FRANCE).
http://www.logilab.fr -- mailto:contact@logilab.fr'''
author = 'LOGILAB S.A. (Paris, FRANCE)'
author_email = 'contact@logilab.fr'
short_desc = 'classified ad'
long_desc = '''classified ad'''
web = 'http://www.cubicweb.org/project/%s' % distname
from os import listdir as _listdir
from os.path import join, isdir, exists
from glob import glob
THIS_CUBE_DIR = join('share', 'cubicweb', 'cubes', modname)
def listdir(dirpath):
return [join(dirpath, fname) for fname in _listdir(dirpath)
if fname[0] != '.' and not fname.endswith('.pyc')
and not fname.endswith('~')
and not isdir(join(dirpath, fname))]
data_files = [
# common files
[THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
]
# check for possible extended cube layout
for dname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'i18n', 'migration'):
if isdir(dname):
data_files.append([join(THIS_CUBE_DIR, dname), listdir(dname)])
# Note: here, you'll need to add subdirectories if you want
# them to be included in the debian package
__depends_cubes__ = {}
__depends__ = {'cubicweb': '>= 3.6.0'}
__use__ = ()
__recommend__ = ()
/* template specific CSS */
// This contains template-specific javascript
\ No newline at end of file
# -*- shell-script -*-
###############################################################################
#
# put here information about external resources used by your components,
# or to overides existing external resources configuration
#
###############################################################################
# CSS stylesheets to include in HTML headers
# uncomment the line below to use template specific stylesheet
# STYLESHEETS = DATADIR/cubes.classifiedad.css
BLUE_ARROW = DATADIR/blue_arrow.png
\ No newline at end of file
cubicweb-classifiedad (0.1.0-1) unstable; urgency=low
* initial release
--
Source: cubicweb-classifiedad
Section: web
Priority: optional
Maintainer: LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
Build-Depends: debhelper (>= 5.0.37.1), python (>=2.4), python-dev (>=2.4)
Standards-Version: 3.8.0
Package: cubicweb-classifiedad
Architecture: all
Depends: cubicweb-common (>= 3.5.11)
Description: classified ad
CubicWeb is a semantic web application framework.
.
classified ad
.
This package will install all the components you need to run the
cubicweb-classifiedad application (cube :)..
Upstream Author:
LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
Copyright:
Copyright (c) 2010 LOGILAB S.A. (Paris, FRANCE).
http://www.logilab.fr -- mailto:contact@logilab.fr
#!/bin/sh -e
delete_pyo_pyc () {
find /usr/share/cubicweb/cubes/classifiedad -name "*.pyc" | xargs rm -f
find /usr/share/cubicweb/cubes/classifiedad -name "*.pyo" | xargs rm -f
}
case "$1" in
failed-upgrade|abort-install|abort-upgrade|disappear)
;;
upgrade)
delete_pyo_pyc
;;
remove)
delete_pyo_pyc
;;
purge)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
esac
#DEBHELPER#
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
build: build-stamp
build-stamp:
dh_testdir
python setup.py -q build
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
rm -rf build
find . -name "*.pyc" | xargs rm -f
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs -i
python setup.py -q install --no-compile --prefix=debian/cubicweb-classifiedad/usr/
# remove generated .egg-info file
rm -rf debian/cubicweb-classifiedad/usr/lib/python*
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_install -i
dh_installchangelogs -i
dh_installexamples -i
dh_installdocs -i
dh_installman -i
dh_link -i
dh_compress -i -X.py -X.ini -X.xml -Xtest
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch:
binary: binary-indep
.PHONY: build clean binary-arch binary-indep binary
"""this contains the cube-specific entities' classes
:organization: Logilab
:copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
"""
from cubicweb.entities import AnyEntity
class ClassifiedAd(AnyEntity):
__regid__ = 'ClassifiedAd'
# hierarchy #############################################################
def parent(self):
if self.advertise:
return self.advertise[0]
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: pygettext.py 1.5\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: pygettext.py 1.5\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: pygettext.py 1.5\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
# postcreate script. You could setup site properties or a workflow here for example
"""
:organization: Logilab
:copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
"""
# Example of site property change
#set_property('ui.site-title', "<sitename>")
# Instructions here will be read before reading the schema
"""
:organization: Logilab
:copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
"""
# You could create your own groups here, like in :
# create_entity('CWGroup', name=u'mygroup')
# cube's specific schema
"""
:organization: Logilab
:copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
"""
from yams.buildobjs import EntityType, String, Datetime, SubjectRelation, Int
class ClassifiedAd(EntityType):
title = String(required=True, fulltextindexed=True)
description = String(fulltextindexed=True)
publication_date = Datetime()
url = String()
price = Int()
currency = String(default='EUR')
same_as = SubjectRelation('ExternalUri')
has_image = SubjectRelation('ExternalUri')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment