Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
flippingtables committed Mar 3, 2014
0 parents commit 9102ab8
Show file tree
Hide file tree
Showing 361 changed files with 71,191 additions and 0 deletions.
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions .idea/Translator.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

177 changes: 177 additions & 0 deletions .idea/dataSources.ids

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions .idea/dataSources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/scopes/scope_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

996 changes: 996 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

Empty file added Translator/__init__.py
Empty file.
Binary file added Translator/__init__.pyc
Binary file not shown.
126 changes: 126 additions & 0 deletions Translator/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
"""
Django settings for Translator project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os,sys

BASE_DIR = os.path.dirname(os.path.dirname(__file__))
SETTINGS_DIR = os.path.dirname(__file__)
PROJECT_PATH = os.path.join(SETTINGS_DIR, os.pardir)
PROJECT_PATH = os.path.abspath(PROJECT_PATH)

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'l89(v-#vgokfn4c4qe+^+h0jwe%rt0lzxz_oa_=ob=$*02*e2z'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'TranslatorManager',
'django.contrib.admin',
'Translator'
)

MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'Translator.urls'

WSGI_APPLICATION = 'Translator.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'TranslatorDB',
'USER':'root',
'PASSWORD':'root'
#os.path.join(BASE_DIR, 'db.sqlite3'),
}
}

# Internationalization
# https://docs.djangoproject.com/en/1.6/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/

STATIC_PATH = os.path.join(PROJECT_PATH, 'static')

STATIC_URL = '/static/' # You may find this is already defined as such.

STATICFILES_DIRS = (
STATIC_PATH,
)

TEMPLATE_PATH = os.path.join(PROJECT_PATH, 'templates')
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
TEMPLATE_PATH,
)

LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format' : "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s",
'datefmt' : "%d/%b/%Y %H:%M:%S"
},
'simple': {
'format': '%(levelname)s %(message)s'
},
},
'handlers': {
'console':{
'level':'DEBUG',
'class':'logging.StreamHandler',
'formatter': 'simple'
},
},
}
Binary file added Translator/settings.pyc
Binary file not shown.
21 changes: 21 additions & 0 deletions Translator/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from django.conf.urls import patterns, include, url
from TranslatorManager import views

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
# Examples:
# url(r'^$', 'Translator.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),

url(r'^admin/', include(admin.site.urls)),
url(r'^$', views.index, name='index'),
url(r'^clients/', views.clients, name='clients'),
url(r'^jobs/', views.jobs, name='jobs'),
url(r'^completed/', views.completed, name='completed'),
#url(r'^jobs/(?P<client>[-\w]+)/all_clients/$', 'all_clients'),
url(r'^add_client/$', views.add_client, name='add_client'), # NEW MAPPING!


)
Binary file added Translator/urls.pyc
Binary file not shown.
14 changes: 14 additions & 0 deletions Translator/wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
WSGI config for Translator project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""

import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Translator.settings")

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
Binary file added Translator/wsgi.pyc
Binary file not shown.
Empty file added TranslatorManager/__init__.py
Empty file.
Binary file added TranslatorManager/__init__.pyc
Binary file not shown.
8 changes: 8 additions & 0 deletions TranslatorManager/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from django.contrib import admin
from TranslatorManager.models import Client,JobType,ClientJob
# Register your models here.


admin.site.register(Client)
admin.site.register(JobType)
admin.site.register(ClientJob)
Binary file added TranslatorManager/admin.pyc
Binary file not shown.
62 changes: 62 additions & 0 deletions TranslatorManager/forms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
__author__ = 'joannes'

from django import forms
from TranslatorManager.models import Client,ClientJob

class ClientForm(forms.ModelForm):
clientName = forms.CharField(max_length=200, help_text="Please enter the client name.")
clientContact = forms.CharField(max_length=200, help_text="Please enter the client contact.")

# An inline class to provide additional information on the form.
class Meta:
# Provide an association between the ModelForm and a model
model = Client
fields = ["clientName", "clientContact"]


class AddJobForm(forms.ModelForm):
clientName = forms.CharField(max_length=200, help_text="Please enter the client name.")
clientContact = forms.CharField(max_length=200, help_text="Please enter the client contact.")

ENGLISH = 'EN'
FRENCH = 'FR'
SPANISH = 'ES'
LANGUAGES = (
(ENGLISH, 'English'),
(FRENCH, 'French'),
(SPANISH, 'Spanish'),
)
TRANSLATION = 'Translation'
REVIEW = 'Review'
DTP = 'DTP'

SERVICES = (
(TRANSLATION, 'Translation'),
(REVIEW, 'Review'),
(DTP, 'DTP'),
)
#client = models.ForeignKey(Client)
clientContact = forms.CharField(max_length=100)
languageFrom = forms.CharField(max_length=2)
languageTarget = forms.CharField(max_length=2)
description = forms.CharField(max_length=300)
service = forms.CharField(max_length=20)
deadLine = forms.DateTimeField()
#currency = models.
hours_Spent = forms.FloatField()
words_new = forms.FloatField()
words_fuzzy50 = forms.FloatField()
words_fuzzy75 = forms.FloatField()
words_fuzzy85 = forms.FloatField()
words_fuzzy95 = forms.FloatField()
words_match = forms.FloatField()
words_rep = forms.FloatField()
words_ice = forms.FloatField()
#multiply total with this percentage value e.g. 100 * 1.50 (50% rush charge)
pay_rush = forms.FloatField()

# An inline class to provide additional information on the form.
class Meta:
# Provide an association between the ModelForm and a model
model = ClientJob
fields = ["clientName", "clientContact"]
Binary file added TranslatorManager/forms.pyc
Binary file not shown.
Loading

0 comments on commit 9102ab8

Please sign in to comment.