본문 바로가기

전체 글

(1836)
[Django]Handling Dynamic Routing CodingEntrepreneurs Django 강의 정리 re_path> 1. Regular expression을 이용한 고급 path matching 2. 좀더 세밀한 조건 - 예를 들어 특정 문자열 길이를 갖는 문자열 검색 - 으로 검색 하고자 한다면 사용 3. regular expressions 은 the raw string literal syntax 로 선언되어야 합니다 (즉, 다음처럼 '' 로 닫혀 있어야 한다 가이드 문법> Symbol Meaning ^ 기술된 text 로 그 문자열이 시작되는지 $ 기술된 text 로 그 문자열이 끝나는지 \d 숫자(0, 1, 2, ... 9) 인지 \w word character 인지. 즉, 대소문자, 숫자, underscore character (_..
[Django]Intro to URL Routing and Dynamic Routing CodingEntrepreneurs Django 강의 정리 path> urlpatterns 포함할 요소를 반환합니다. int의 경우 10진수 문자열과 일치하는 경우를 말합니다. 가이드 urls.py> # tweetme2/urls.py from django.contrib import admin from django.urls import path from tweets.views import home_view, tweet_detail_view urlpatterns = [ path("admin/", admin.site.urls), path("", home_view), path("tweets/", tweet_detail_view), ] models.py> # tweets/models.py from django.d..
[Django]The Tweets Model CodingEntrepreneurs Django 강의 정리 tweets App 생성> python manage.py startapp tweets 디렉토리 확인> manage.py tweetme2/ tweets/ admin.py apps.py models.py tests.py views.py __init__.py migrations/ 추가된 파일 및 폴더> migrations 디렉터리 모델 수정시 데이터베이스를 업데이트 하는것을 가능하게 해줄 파일 모음 디렉터리 __init__.py Python Package로 인식하게 할 빈 파일 settings.py> # tweetme2/settings.py INSTALLED_APPS = [ "django.contrib.admin", "django.contrib.aut..
[Django]Our Roadmap CodingEntrepreneurs Django 강의 정리 각 메뉴 로드맵 작성> 1. Tweets -> Creating -> Text -> Image -> Delete -> Retweeting 2. Users -> Register -> Login -> Logout -> Profile -> Image -> Text -> Follow Button -> Feed -> User's feed only? -> User + Who they follow? 3. Following / Followers Long term todos - Notifications - DM - Explore -> finding hashtags
[Django]Setup Django Project CodingEntrepreneurs Django 강의 정리 project 생성> django-admin startproject tweetme2 . 디렉토리 확인> manage.py tweetme2/ __init__.py settings.py urls.py asgi.py wsgi.py 각 파일의 의미> __init__.py Python 패키지로 다루도록 지시 settings.py 웹사이트의 모든 설정을 포함 urls.py 사이트의 url - view의 연결을 지정 wsgi.py 웹서버와 연결 및 소통하는 것을 도와줌 manage.py 어플리케이션을 생성 하고 데이터베이스와 작ㅇ버하고 개발웨 서버를 시작하기 위해 사용
[WakaTime]Week 3 of Jun(20.06.15 ~ 20.06.21) WakaTime 20.06.15 ~ 20.06.21 Coding : 24hrs 59mins IDEL : VS Code Language : Python / HTML
[Django]Result CodingEntrepreneurs Django 강의 정리 메인페이지> 검색 결과> 로그인 후 블로그 탭> 로그아웃 후 블로그 탭> 생성 페이지> 삭제 페이지> 상세 보기> 수정 페이지>
[Django]Complex Lookups CodingEntrepreneurs Django 강의 정리 models> from django.conf import settings from django.db import models from django.db.models import Q from django.utils import timezone # Create your models here. User = settings.AUTH_USER_MODEL class BlogPostQuerySet(models.QuerySet): def published(self): now = timezone.now() return self.filter(publish_date__lte=now) def search(self, query): lookup = ( Q(title__i..