Commits

reorx committed 50a4d12

reset all structure ING

Comments (0)

Files changed (33)

duty/__init__.pyc

Binary file removed.

duty/admin.pyc

Binary file removed.

duty/getdb.pyc

Binary file removed.

duty/models.pyc

Binary file removed.

duty/query/check.py

Empty file added.

duty/query/set.py

Empty file added.

duty/reference/__init__.py

Empty file added.

duty/reference/fn.py

+#coding=utf-8
+import datetime
+date_today = datetime.date.today()
+
+def str_to_date(s):
+    elmt = s.split('-')
+    dy,dm,dd = elmt[0:3]
+    dy = int(dy)
+    dm = int(dm)
+    dd = int(dd)
+    date = datetime.date(dy,dm,dd)
+    return date

duty/reference/objects.py

+#coding=utf-8
+class Words:
+    login = u'签到成功~'
+    came = u'你已经来了呃..'
+    unexist = u'成员不存在'
+    error = u'写入不正确,请重试'
+    logout = u'签出成功~'
+    gone = u'你不是已经走了吗??'
+    uncame = u'你还没签到啊..'
+

duty/urls.pyc

Binary file removed.

duty/urls/__init__.py

Empty file added.

duty/urls/arrange.py

+from django.conf.urls.defaults import *
+from zq_onduty.duty.views import arrange
+
+urlpatterns = patterns('',
+    (r'^list/', arrange.week_oneweek),
+    (r'^list_oneweek/', arrange.week_oneweek_ajax),
+    (r'^set_week_info/', arrange.setWeekInfo),
+    (r'^member_select/', arrange.memberSelect),
+    (r'^member_submit/', arrange.memberSubmit),
+    (r'^next/',arrange.week_next),
+)

duty/urls/record.py

+from django.conf.urls.defaults import *
+from zq_onduty.duty.views import record
+
+#/duty/  #classified by Model ?
+urlpatterns = patterns('',
+    (r'^memberCome/', record.memberCome),
+    (r'^memberGo/', record.memberGo),
+    (r'^list/', record.duty_list_main),
+    (r'^list_oneweek/', record.duty_list_oneweek),
+    (r'^list_oneday/', record.duty_list_oneday),
+    (r'^setDateLog/', record.setDateLog),
+)

duty/urls_duty.py

 from django.conf.urls.defaults import *
 from duty import views
 
+#/duty/  #classified by Model ?
 urlpatterns = patterns('',
     (r'^memberCome/', views.memberCome),
     (r'^memberGo/', views.memberGo),

duty/urls_duty.pyc

Binary file removed.

duty/urls_week.pyc

Binary file removed.
 import datetime
 date_today = datetime.date.today()
 
-##############
-#class used
-##############
-class Words:
-    login = u'签到成功~'
-    came = u'你已经来了呃..'
-    unexist = u'成员不存在'
-    error = u'写入不正确,请重试'
-    logout = u'签出成功~'
-    gone = u'你不是已经走了吗??'
-    uncame = u'你还没签到啊..'
+from duty.reference import fn  #function used
+from duty.reference.objects import Words  #class used
 
 ##############
-#function used
-##############
-def str_to_date(s):
-    elmt = s.split('-')
-    dy,dm,dd = elmt[0:3]
-    dy = int(dy)
-    dm = int(dm)
-    dd = int(dd)
-    date = datetime.date(dy,dm,dd)
-    return date
-##############
 #
 ##############
 def memberCome(request):
         w = Weekarrange.objects.get(startday=thisweek_mon)
         week_mem_list = getdb_duty.get_oneweek(date_today)
 
-        return render_to_response('week/week.html',{
+        return render_to_response('week/list.html',{
                 'week_mem_list' : week_mem_list,
                 'week_info' : w,
                 'date_server' : date_today,
 def week_oneweek_ajax(request):
     oneday_str = request.GET.get('date')
     ###
-    oneday_date = str_to_date(oneday_str)
+    oneday_date = fn.str_to_date(oneday_str)
     thisweek_mon = oneday_date + datetime.timedelta(days = -oneday_date.weekday())
     ###
     w = Weekarrange.objects.filter(startday=thisweek_mon)

duty/views.pyc

Binary file removed.

duty/views/__init__.py

Empty file added.

duty/views/arrange.py

+#coding=utf-8
+from django.shortcuts import render_to_response
+from django.http import HttpResponseRedirect,HttpResponse
+from django.template import RequestContext,Context
+from django.template.loader import get_template
+
+from zq_onduty.duty.models import Dutyinfo,Dateinfo,Weekarrange
+from zq_onduty.member.models import Member
+from zq_onduty.duty import getdb as getdb_duty
+from zq_onduty.member import getdb as getdb_member
+
+from django.contrib.auth.decorators import permission_required
+
+import datetime
+date_today = datetime.date.today()
+
+from zq_onduty.duty.reference import fn  #function used
+from zq_onduty.duty.reference.objects import Words  #class used
+
+def week_oneweek(request):
+    if request.GET.get('date') == None:
+        thisweek_mon = date_today + datetime.timedelta(days = -date_today.weekday())
+        w = Weekarrange.objects.get(startday=thisweek_mon)
+        week_mem_list = getdb_duty.get_oneweek(date_today)
+
+        return render_to_response('week/list.html',{
+                'week_mem_list' : week_mem_list,
+                'week_info' : w,
+                'date_server' : date_today,
+            },
+            context_instance=RequestContext(request)
+        )
+
+def week_oneweek_ajax(request):
+    oneday_str = request.GET.get('date')
+    ###
+    oneday_date = fn.str_to_date(oneday_str)
+    thisweek_mon = oneday_date + datetime.timedelta(days = -oneday_date.weekday())
+    ###
+    w = Weekarrange.objects.filter(startday=thisweek_mon)
+    if w:
+        w = w.get()
+        week_mem_list = getdb_duty.get_oneweek(oneday_date)
+
+        t = get_template('week/week_block.html')
+        c = Context({
+                'week_mem_list' : week_mem_list,
+                'week_info' : w,
+            })
+        return HttpResponse(t.render(c))
+    else:
+        return HttpResponse('sorry, nothing')
+
+def setWeekInfo(request):
+    varId = int(request.GET.get('id'))
+    varV = request.GET.get('v')
+    varElmt = request.GET.get('elmt')
+    w = Weekarrange.objects.get(id=varId)
+    if varElmt == 'log':
+        w.log = varV
+        x = '日志'
+    if varElmt == 'name':
+        w.name_manager = varV
+        x = '负责人'
+    w.save()
+    return HttpResponse(x + ' 已更改.周')
+
+def setDateLog(request):
+    varId = int(request.GET.get('id'))
+    varLog = request.GET.get('log')
+    print 'setDateLog'
+    d = Dateinfo.objects.get(id=varId)
+    d.log = varLog
+    d.save()
+    print d.log
+    return HttpResponse('日志 已更改.日')
+
+def week_next(request):
+    date_ofnextweek = datetime.date.today() + datetime.timedelta(days=7)
+    week_mem_list = getdb_duty.get_oneweek(date_ofnextweek)
+
+    d = date_ofnextweek
+    m = d + datetime.timedelta(days = -d.weekday())
+    w = Weekarrange.objects.get(startday = m)
+    t = get_template('week/week_block.html')
+    c = Context({
+            'week_mem_list' : week_mem_list,
+            'week_info' : w,
+        })
+
+    return HttpResponse(t.render(c))
+#######################
+#member select
+#######################
+def memberSelect(request):
+    d = request.GET.get('date')
+    t = get_template('week/member_block.html')
+    dpmt_mem_list = getdb_member.get_mem_by_dpmt_all()
+    memShouldComeList = getdb_duty.get_mem_inarrange_oneday(d)
+    c = Context({
+            'dpmt_mem_list':dpmt_mem_list,
+            'mem_shouldcome_list':memShouldComeList,
+        })
+    return HttpResponse(t.render(c))
+
+def memberSubmit(request):
+    date = request.GET.get('date')
+    mem = request.GET.get('mem')
+    #清空之
+    d = Dateinfo.objects.get(date=date)
+    _duty = Dutyinfo.objects.filter(date_duty=d)
+    for duty in _duty:
+        duty.if_set = 0
+        duty.save()
+    ###
+    if mem != '': #这个是对的
+        mem_list = mem.split('-')
+        for memid in mem_list:
+            getdb_duty.set_duty_shouldcome(date,memid)
+    ###
+    getdb_duty.set_date_shouldcome(date,mem)
+    return HttpResponse('arrange member success')

duty/views/record.py

+#coding=utf-8
+from django.shortcuts import render_to_response
+from django.http import HttpResponseRedirect,HttpResponse
+from django.template import RequestContext,Context
+from django.template.loader import get_template
+
+from zq_onduty.duty.models import Dutyinfo,Dateinfo,Weekarrange
+from zq_onduty.member.models import Member
+from zq_onduty.duty import getdb as getdb_duty
+from zq_onduty.member import getdb as getdb_member
+
+from django.contrib.auth.decorators import permission_required
+
+import datetime
+date_today = datetime.date.today()
+
+from zq_onduty.duty.reference import fn  #function used
+from zq_onduty.duty.reference.objects import Words  #class used
+
+def memberCome(request):
+    n_member = request.POST.get('name')
+    p_member = request.POST.get('password')
+    ip_come = request.META['REMOTE_ADDR']
+    if n_member != '' and p_member != '':
+        check_member = Member.objects.filter(name=n_member).filter(password=p_member)
+        if check_member:
+            #filter args
+            date_today = datetime.date.today()
+            time_now = datetime.datetime.now()
+            time_now_str = time_now.strftime('%H:%M:%S')
+            #now filter
+            dateinfo = Dateinfo.objects.get(date=date_today)
+            check_ifcome = Dutyinfo.objects.filter(date_duty=dateinfo).filter(name_member=n_member).filter(if_come=1)
+            #check_ifcome = Dutyinfo.objects.filter(date_duty=date_today).filter(name_member=n_member)
+            if check_ifcome:
+                return HttpResponse(Words.came)
+            else:
+                dutyinfo_query = Dutyinfo(
+                    date_duty=dateinfo,
+                    name_member=n_member,
+                    if_come=1,
+                    cometime=time_now_str,
+                    gotime='00:00:01',
+                    ip_login=ip_come
+                )
+                dutyinfo_query.save()
+                #[member_score]
+                if dateinfo.come_set:
+                    come_set = dateinfo.come_set.split(',')
+                    check_member = check_member.get()
+                    if str(check_member.id) in come_set:
+                        check_member.normalcome = check_member.normalcome + 1
+                        check_member.save()
+                #end[member_score]
+                return HttpResponse(Words.login)
+        else:
+            return HttpResponse(Words.unexist)
+    else:
+        return HttpResponse(Words.error)
+
+def memberGo(request):
+    n_member = request.POST.get('name')
+    p_member = request.POST.get('password')
+    ip_go = request.META['REMOTE_ADDR']
+    if n_member != '' and p_member != '':
+        check_member = Member.objects.filter(name=n_member).filter(password=p_member)
+        if check_member:
+            #[args]
+            date_today = datetime.date.today()
+            time_now = datetime.datetime.now()
+            time_now_str = time_now.strftime('%H:%M:%S')
+            #end [args]
+            dateinfo = Dateinfo.objects.get(date=date_today)
+            check_ifcome = Dutyinfo.objects.filter(date_duty=dateinfo).filter(name_member=n_member).filter(if_come=1).get()
+            if check_ifcome:
+                check_ifgo = Dutyinfo.objects.filter(date_duty=dateinfo).filter(name_member=n_member).filter(gotime__gt='00:00:02')
+                if check_ifgo:
+                    return HttpResponse(Words.gone)
+                else:
+                    check_ifcome.gotime = time_now_str
+                    check_ifcome.ip_logout = ip_go
+                    check_ifcome.save()
+                    return HttpResponse(Words.logout)
+            else:
+                return HttpResponse(Words.uncame)
+        else:
+            return HttpResponse(Words.unexist)
+    else:
+        return HttpResponse(Words.error)
+
+###############################
+#duty list
+###############################
+@permission_required('duty.can_read')
+def duty_list_main(request):
+    dateinfo_duty_thisweek_list = getdb_duty.get_dateinfo_duty_thisweek()
+    dateinfo_duty_today = getdb_duty.get_dateinfo_duty_oneday(date_today)
+
+    return render_to_response('duty/list.html',{
+        'd' : dateinfo_duty_today,
+        'dateinfo_duty_week_list' : dateinfo_duty_thisweek_list,
+        'date_server' : date_today,
+        },
+        context_instance=RequestContext(request)
+    )
+
+@permission_required('duty.can_read')
+def duty_list_oneweek(request):
+    oneday_str = request.GET.get("date")
+    dateinfo_duty_oneweek_list = getdb_duty.get_dateinfo_duty_oneweek(oneday_str)
+    t = get_template('duty/week_block.html')
+    c = Context({
+        'dateinfo_duty_week_list' : dateinfo_duty_oneweek_list,
+        }
+    )
+    print 'oneweek'
+    return HttpResponse(t.render(c))
+
+@permission_required('duty.can_read')
+def duty_list_oneday(request):
+    oneday_str = request.GET.get("date")
+    dateinfo_duty_oneday = getdb_duty.get_dateinfo_duty_oneday(oneday_str)
+    t = get_template('duty/day_block.html')
+    c = Context({
+        'd' : dateinfo_duty_oneday,
+        }
+    )
+    print 'oneday'
+    return HttpResponse(t.render(c))
+
+def setDateLog(request):
+    varId = int(request.GET.get('id'))
+    varLog = request.GET.get('log')
+    print 'setDateLog'
+    d = Dateinfo.objects.get(id=varId)
+    d.log = varLog
+    d.save()
+    print d.log
+    return HttpResponse('日志 已更改.日')
+

duty/views_duty.py

+#coding=utf-8
+from django.shortcuts import render_to_response
+from django.http import HttpResponseRedirect,HttpResponse
+from django.template import RequestContext,Context
+from django.template.loader import get_template
+
+from duty.models import Dutyinfo,Dateinfo,Weekarrange
+from member.models import Member
+
+from duty import fn  #function used
+from duty.objects import Words  #class used
+from duty import getdb as getdb_duty
+from member import getdb as getdb_member
+
+from django.contrib.auth.decorators import permission_required
+
+import datetime
+date_today = datetime.date.today()

settings.pyc

Binary file modified.

static/js/board_selectmember.js

 
 function submitMem(mem) {
     var ajax = new XMLHttpRequest(); //set ajax
-    var url = "/week/member_submit/?mem=" + mem + "&date=" + date_selectmember;
+    var url = "/arrange/member_submit/?mem=" + mem + "&date=" + date_selectmember;
     ajax.open("GET", url, true);
     ajax.send(null);
     ajax.onreadystatechange = function() {
             $('#selectmember_container').remove();
             $('#modify-board').append(datepickerDOM);
 
-            var url_week = '/week/list_oneweek/?date='+date_selectmember;
+            var url_week = '/arrange/list_oneweek/?date='+date_selectmember;
             $('#week').load(url_week);
             
         }

static/js/changeLog.js

     var log = $('#m-b-content').val();
     $.ajax({
         type: 'GET',
-        url: '/duty/setDateLog/',
+        url: '/record/setDateLog/',
         data: 'id='+DATE_ID+'&log='+log,
         success: function(status) {
             DOM_ONCLICK.html(log)
 function oneWeek(date) {
     $.ajax({
         type: 'GET',
-        url: '/duty/list_oneweek/',
+        url: '/record/list_oneweek/',
         data: 'date='+date,
         success: function(html) {
             $('#list_week').html(html);
 function oneDay(date) {
     $.ajax({
         type: 'GET',
-        url: '/duty/list_oneday/',
+        url: '/record/list_oneday/',
         data: 'date='+date,
         success: function(html) {
             $('#list_day').html(html);

static/js/change_weekinfo.js

 
 function changeWeekInfo(b) {
     var ajax = new XMLHttpRequest();
-    var url = "/week/set_week_info/?id=" + sqlid + "&v=" + b.value + "&elmt=" + sendwhat;
+    var url = "/arrange/set_week_info/?id=" + sqlid + "&v=" + b.value + "&elmt=" + sendwhat;
     ajax.open("GET", url, true);
     ajax.send(null);
     ajax.onreadystatechange = function(){
 
 function changeDatelog(b) {
     var ajax = new XMLHttpRequest(); //set ajax
-    var url = "/duty/setDateLog/?id=" + sqlid + "&log=" + b.value;
+    var url = "/record/setDateLog/?id=" + sqlid + "&log=" + b.value;
     ajax.open("GET", url, true);
     ajax.send(null);
     ajax.onreadystatechange = function() {
     c.css("width", "300px").css("height", "400px").css("z-index", "6");
     //ajax request
     var ajax = new XMLHttpRequest(); //set ajax
-    var url = "/week/member_select/?date="+date_selectmember;
+    var url = "/arrange/member_select/?date="+date_selectmember;
     ajax.open("GET", url, true);
     ajax.send(null);
     var html;

static/js/login-and-logout.js

         //ajax及其中success与之后语句响应顺序 some quest...
         $.ajax({
             type: 'POST',
-            url: '/duty/memberCome/',
+            url: '/record/memberCome/',
             data: 'name='+n+'&password='+p,
             success: function(status){
                 chgStatus(status);
         //ajax及其中success与之后语句响应顺序 some quest...
         $.ajax({
             type: 'POST',
-            url: '/duty/memberGo/',
+            url: '/record/memberGo/',
             data: 'name='+n+'&password='+p,
             success: function(status){
                 //$('#status').html(status).fadeOut('slow').fadeIn('slow');

templates/base.html

             {% if user.is_authenticated %}
                 <a href="/department/">成员</a>
                 {% if perms.duty.can_read %}
-                    <a href="/duty/list/">记录</a>
+                    <a href="/record/list/">记录</a>
                 {% endif %}
                 {% if perms.duty.can_arrange %}
-                    <a href="/week/list/">安排</a>
+                    <a href="/arrange/list/">安排</a>
                 {% endif %}
             {% endif %}
             </div>

templates/duty/week_block.html

 {% load filter_extra %}
 
-<div class=listTitle>周</div>
+<div class=listTitle>周</div>
 <div class="listContainer">
 <table cellspacing="0">
     <tr>

templates/week/list.html

+{% extends 'base.html' %}
+
+{% block title %}
+{% endblock %}
+
+{% block head_extra %}
+    <!--CSS: week show--> <link rel="stylesheet" type="text/css" href="/static/css/week.css" />
+    <!--CSS-plugin: datepicker--> <link rel="stylesheet" type="text/css" href="/static/css/datepicker.css" />
+    <!--CSS:member select--> <link type="text/css" rel="stylesheet" href="/static/css/week_memberselect.css" />
+    <!--CSS: modify-board--> <link rel="stylesheet" type="text/css" href="/static/css/modify-board.css" />
+
+    <!--JS-plugin:datepicker--> <script type="text/javascript" src="/static/js/datepicker.js"></script>
+    <!--JS:--> <script type="text/javascript" src="/static/js/change_weekinfo.js"></script>
+    <!--JS:member select--> <script src="/static/js/board_selectmember.js"></script>
+
+    <script> //hide board
+        function hideBoard() { $('#m-b-content').hide(); }//document.getElementById("m-b-content").style.display = 'none'; }
+    </script>
+{% endblock %}
+
+{% block container %}
+{% include 'include/modify-board-date.html' %}
+
+<div id=week>
+    <div id=week_list>
+        <table cellspacing=0>
+            <tr>
+                <td width=35 class="titleTop">星期</td><td width=80 class="titleTop">日期</td><td width=300 class="titleTop">人员安排</td><td width=60 class="titleTop">备注</td>
+            </tr>
+        </table>
+        <table cellspacing=5>
+        {% for dateinfo,mem_list in week_mem_list %}
+            <tr>
+                <td width=20 class="tdContent tdWeek"> {{ forloop.counter }} </td>
+                <td width=80 class=tdContent>{{ dateinfo.date|date:"Y/m/d" }}</td>
+                <td width=290 style="text-align:left;border-left: 10px solid #555">
+                    <a id="arrangeButton"
+                        dateofit="{{ dateinfo.date|date:"Y-m-d" }}"
+                        onClick="setBoard(this);";
+                    >重新安排</a>
+                    <div id=memsContainer>
+                    {% for mem in mem_list %}
+                        <span class="nameBlock">{{ mem.name}}</span>
+                    {% endfor %}
+                    </div>
+                </td>
+                <td id="week_list_datelog" class="tdContent tdLog" width="50"
+                    sqlid="{{ dateinfo.id }}"
+                    title="datelog"
+                    onClick="setOnboard(this);" 
+                >{{ dateinfo.log }}</td>
+            </tr>
+        {% endfor %}
+        </table>
+    </div>
+
+    <div id=week_info>
+        <div id=week_info_name_title class="titleTop">负责人</div>
+        <div id=week_info_name class="tdContent">
+            <div id="week_info_name_{{ week_info.id }}" 
+                style="width:90px;height:320px;position:relative;left:4;top:7;" 
+                sqlid="{{ week_info.id }}"
+                title="name"
+                onClick="setOnboard(this);" 
+            >{{ week_info.name_manager }}</div>
+        </div>
+        <div id=week_info_log_title class="titleTop">备注</div>
+        <div id=week_info_log class="tdContent">
+            <div id="week_info_log_{{ week_info.id }}" 
+                style="width:90px;height:320px;position:relative;left:4;top:7;" 
+                sqlid="{{ week_info.id }}"
+                title="log"
+                onClick="setOnboard(this);" 
+            >{{ week_info.log }}</div>
+        </div>
+    </div>
+</div>
+<a id="nextweek" class="bigButton" style="width: 100;margin-top: 20px">安排下周</a>
+
+<script>
+    hideBoard();
+    $('#datepicker_frame').DatePicker({
+        flat: true,
+        date: '{{ date_server|date:"Y-m-d" }}',
+        starts: 1,
+        onChange: function(formated, dates){
+            $('#m-b-head').html(formated);
+            //jquery中可以调用普通函数啊
+            var url_week = '/week/list_oneweek/?date='+formated;
+            $('#week').load(url_week);
+        }
+    });
+
+    $('#nextweek').click(function() {
+        var url_week = '/week/next/';
+        $('#week').load(url_week);
+    });
+</script>
+{% endblock %}

templates/week/week.html

-{% extends 'base.html' %}
-
-{% block title %}
-{% endblock %}
-
-{% block head_extra %}
-    <!--CSS: week show--> <link rel="stylesheet" type="text/css" href="/static/css/week.css" />
-    <!--CSS-plugin: datepicker--> <link rel="stylesheet" type="text/css" href="/static/css/datepicker.css" />
-    <!--CSS:member select--> <link type="text/css" rel="stylesheet" href="/static/css/week_memberselect.css" />
-    <!--CSS: modify-board--> <link rel="stylesheet" type="text/css" href="/static/css/modify-board.css" />
-
-    <!--JS-plugin:datepicker--> <script type="text/javascript" src="/static/js/datepicker.js"></script>
-    <!--JS:--> <script type="text/javascript" src="/static/js/change_weekinfo.js"></script>
-    <!--JS:member select--> <script src="/static/js/board_selectmember.js"></script>
-
-    <script> //hide board
-        function hideBoard() { $('#m-b-content').hide(); }//document.getElementById("m-b-content").style.display = 'none'; }
-    </script>
-{% endblock %}
-
-{% block container %}
-{% include 'include/modify-board-date.html' %}
-
-<div id=week>
-    <div id=week_list>
-        <table cellspacing=0>
-            <tr>
-                <td width=35 class="titleTop">星期</td><td width=80 class="titleTop">日期</td><td width=300 class="titleTop">人员安排</td><td width=60 class="titleTop">备注</td>
-            </tr>
-        </table>
-        <table cellspacing=5>
-        {% for dateinfo,mem_list in week_mem_list %}
-            <tr>
-                <td width=20 class="tdContent tdWeek"> {{ forloop.counter }} </td>
-                <td width=80 class=tdContent>{{ dateinfo.date|date:"Y/m/d" }}</td>
-                <td width=290 style="text-align:left;border-left: 10px solid #555">
-                    <a id="arrangeButton"
-                        dateofit="{{ dateinfo.date|date:"Y-m-d" }}"
-                        onClick="setBoard(this);";
-                    >重新安排</a>
-                    <div id=memsContainer>
-                    {% for mem in mem_list %}
-                        <span class="nameBlock">{{ mem.name}}</span>
-                    {% endfor %}
-                    </div>
-                </td>
-                <td id="week_list_datelog" class="tdContent tdLog" width="50"
-                    sqlid="{{ dateinfo.id }}"
-                    title="datelog"
-                    onClick="setOnboard(this);" 
-                >{{ dateinfo.log }}</td>
-            </tr>
-        {% endfor %}
-        </table>
-    </div>
-
-    <div id=week_info>
-        <div id=week_info_name_title class="titleTop">负责人</div>
-        <div id=week_info_name class="tdContent">
-            <div id="week_info_name_{{ week_info.id }}" 
-                style="width:90px;height:320px;position:relative;left:4;top:7;" 
-                sqlid="{{ week_info.id }}"
-                title="name"
-                onClick="setOnboard(this);" 
-            >{{ week_info.name_manager }}</div>
-        </div>
-        <div id=week_info_log_title class="titleTop">备注</div>
-        <div id=week_info_log class="tdContent">
-            <div id="week_info_log_{{ week_info.id }}" 
-                style="width:90px;height:320px;position:relative;left:4;top:7;" 
-                sqlid="{{ week_info.id }}"
-                title="log"
-                onClick="setOnboard(this);" 
-            >{{ week_info.log }}</div>
-        </div>
-    </div>
-</div>
-<a id="nextweek" class="bigButton" style="width: 100;margin-top: 20px">安排下周</a>
-
-<script>
-    hideBoard();
-    $('#datepicker_frame').DatePicker({
-        flat: true,
-        date: '{{ date_server|date:"Y-m-d" }}',
-        starts: 1,
-        onChange: function(formated, dates){
-            $('#m-b-head').html(formated);
-            //jquery中可以调用普通函数啊
-            var url_week = '/week/list_oneweek/?date='+formated;
-            $('#week').load(url_week);
-        }
-    });
-
-    $('#nextweek').click(function() {
-        var url_week = '/week/next/';
-        $('#week').load(url_week);
-    });
-</script>
-{% endblock %}
     (r'^$', views_home.home),
     (r'^home/',include('home.urls')),
     (r'^member/', include('member.urls')),
-    (r'^duty/', include('duty.urls_duty')),
-    (r'^week/', include('duty.urls_week')),
+    (r'^record/', include('duty.urls.record')),
+    (r'^arrange/', include('duty.urls.arrange')),
     (r'^department/', include('department.urls')),
     (r'^admin/',include(admin.site.urls)),
     #log in&out

urls.pyc

Binary file modified.