* setting.py 에 아래와 같이 내용을 추가합니다. 


import logging.handlers 추가 


..

..


# LOGGING 을 선언한다.

LOGGING = {

    'version': 1,

    'disable_existing_loggers': False,

    'formatters': {                        # message 출력 포맷 형식

        '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': {

        'file': {

            'level': 'DEBUG',

            # 'class': 'logging.FileHandler',

            'class' : 'logging.handlers.TimedRotatingFileHandler',

            'filename': './log/crmstotal.log',        # message가 저장될 파일명(파일명 변경 가능)

            'formatter': 'verbose'

        },

    },

    'loggers': {

        'django': {

            'handlers':['file'],

            'propagate': True,

            'level':'DEBUG',

        },

        'crmtotal': {                  # Project에서 생성한 app의 이름

            'handlers': ['file'],      # 다른 app을 생성 후 해당 app에서도

            'level': 'DEBUG',           # 사용하고자 할 경우 해당 app 이름으로

        },                             # 좌측 코드를 추가 작성해서 사용

    }

}



대략 설정되면 log 폴더에 crmstotal.log.2018-04-20 와 같은 구조로 파일이 생성됩니다. 



by 아휴덥다 2018. 4. 20. 13:50
  • Install Python 2.7 from https://www.python.org/downloads/

    You need to adjust PATH environment variable to include paths to the Python executable and additional scripts. The following paths need to be added to PATH:

    C:\Python27\;C:\Python27\Scripts\;
    

    To update the PATH open a Command prompt and run:

    c:\python27\python.exe c:\python27\tools\scripts\win_add2path.py
    

    Close the command prompt window and reopen it so changes take effect, run the following command and check it shows the expected Python version:

    python --version
    
  • Install pywin32 from http://sourceforge.net/projects/pywin32/

    Be sure you download the architecture (win32 or amd64) that matches your system

  • (Only required for Python<2.7.9) Install pip from https://pip.pypa.io/en/latest/installing/

    Now open a Command prompt to check pip is installed correctly:

    pip --version
    
  • At this point Python 2.7 and pip package manager must be working, let’s install Scrapy:

    pip install Scrapy

* 출처 : http://doc.scrapy.org/en/latest/intro/install.html#installing-scrapy



만약 scrapy 빌드될시에 visual Studio 관련 오류가 발생된다면 

해당 사이트에서 프로그램을 다운받은 후 재설치를 해보면 된다. 


https://www.microsoft.com/en-us/download/confirmation.aspx?id=44266


+++ 


pyOpenSSL 설치 


pip install pyOpenSSL-16.0.0-py2.py3-none-any.whl 




by 아휴덥다 2016. 7. 21. 09:58

본인들이 보유하고 있는 카드들의 포인트가 과연 얼마나 있을까? 


그걸 하나의 화면에서 조회하는 방법은 없을까?  


1. 여신금융협회( http://www.cardpoint.or.kr ) 에 방문,  






2. 카드포인트 통합조회를 선택하여, 본인의 이름과 주민등록번호을 입력하는 란이 나오게 되고, 

3. 조회할 카드사를 선택하고 [카드포인트 통합조회] 를 눌러 조회를 하도록 한다. 





4. 통합포인트를 조회하고 난 후에 각 카드사의 홈페이지에 접속하여, 포인트 쓰기를 하면 본인의 계좌로 이체를 할 수도 있고, 세금납부등에도 이용할 수 있다. 




'자금관리이야기' 카테고리의 다른 글

2014.08.14일자 기업동향 뉴스모니터링  (0) 2014.08.22
by 아휴덥다 2015. 11. 16. 10:12
| 1 2 3 4 ··· 9 |