안녕하세요. ipython에서 실습 중 에러가 발생합니다. 먼저, application.py는 다음과 같이 작성하였습니다. from flask_sqlalchemy import SQLAlchemy from flask import Flask app = Flask( __name__ ) app.config[ 'SQLALCHEMY_DATABASE_URI' ] = 'sqlite:///C:/jieun/inflearn/form.db' db = SQLAlchemy(app) #Role, Member, Project class Role ( db . Model ): id = db.Column(db.Integer, primary_key = True ) position = db.Column(db.String( 50 )) members = db.relationship( 'Member' , backref = 'role' , lazy = 'dynamic' ) class Member ( db . Model ): id = db.Column(db.Integer, primary_key = True ) name = db.Column(db.String( 100 )) role_id = db.Column(db.Integer, db.ForeignKey( 'role.id' )) projects = db.relationship( 'Project' , secondary = 'member_project' , backref = 'member' , lazy = 'dynamic' ) class Project ( db . Model ): id = db.Column(db.Integer, primary_key = True ) name = db.Column(db.String( 100 )) members = db.relationship( 'Member' , secondary = 'member_project' , backref = 'project' , lazy = 'dynamic' ) db.Table( 'member_project' , db.Column( 'member_id' , db.Integer, db.ForeignKey( 'member.id' )), db.Column( 'porject_id' , db.Integer, db.ForeignKey( 'project.id' )) ) 그리고 아래는 ipython에서 실습한 내용입니다. In [1]: from application import db c:\jieun\inflearn\venv\lib\site-packages\flask_sqlalchemy\__init__.py:872: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to suppress this warning. warnings.warn(FSADeprecationWarning( In [2]: from application import Role, Member, Project In [3]: admin = Role(position = 'admin') c:\jieun\inflearn\venv\lib\site-packages\sqlalchemy\orm\relationships.py:3441: SAWarning: relationship 'Member.project' will copy column member.id to column member_project.member_id, which conflicts with relationship(s): 'Project.member' (copies member.id to member_project.member_id), 'Member.projects' (copies member.id to member_project.member_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx) util.warn( c:\jieun\inflearn\venv\lib\site-packages\sqlalchemy\orm\relationships.py:3441: SAWarning: relationship 'Member.project' will copy column project.id to column member_project.porject_id, which conflicts with relationship(s): 'Project.member' (copies project.id to member_project.porject_id), 'Member.projects' (copies project.id to member_project.porject_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx) util.warn( c:\jieun\inflearn\venv\lib\site-packages\sqlalchemy\orm\relationships.py:3441: SAWarning: relationship 'Project.members' will copy column project.id to column member_project.porject_id, which conflicts with relationship(s): 'Project.member' (copies project.id to member_project.porject_id), 'Member.projects' (copies project.id to member_project.porject_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx) util.warn( c:\jieun\inflearn\venv\lib\site-packages\sqlalchemy\orm\relationships.py:3441: SAWarning: relationship 'Project.members' will copy column member.id to column member_project.member_id, which conflicts with relationship(s): 'Project.member' (copies member.id to member_project.member_id), 'Member.projects' (copies member.id to member_project.member_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx) util.warn( db.create_all()로 form.db 파일은 생성된 상황입니다. 보시고 도움 부탁드립니다~!
Spring REST API 도 당연히 Spring MVC구조에서 벗어 나지 않을 것이라고 생각 되는데요. REST API는 뷰가 없이 json 데이터를 넘겨주는 형태이니 MVC구조에서 viewResolver와 view가 생략 되고 대신 REST API에 맞는 헨들러 어뎁터가 존재 한다고 보면 맞을까요? 혹은 모든 어뎁터는 ModelAndView가 반환되는게 인터페이스의 규약이라면 REST API는 빈 ModelAndView 가 반환된다고 봐야 할까요? 왠지 뒷쪽에서 설명이 자세히 나올 것 같지만 궁금하여 미리 질문을 드려 봅니다.. ^^; (혹은 여기에 대한 설명이 있는 강의 이름을 알려주시면 바로 점프 해서 보도록 하겠습니다)
다음 카페 크롤링을 공부하고 있는데요 제공해 주신 소스 코드를 실행하는데 > list.url<-paste0("http://m.cafe.daum.net/dotax/Elgq?page=",k) Error in paste0("http://m.cafe.daum.net/dotax/Elgq?page=", k) : 객체 'k'를 찾을 수 없습니다 이렇게 나옵니다.
back 폴더의 API router를 확인해보다가, router.delete( "workspaces/:workspace/channels/:channel/members/:id" ...) 이런 API를 보았습니다! 그래서 <InviteChannelModal />을 만들었듯이, <DeleteChannelModal />을 만들어서, 유저 추가하기 버튼 옆에다가, 유저 내보내기 버튼도 만들어 보았습니다~ 그런데 API에서 원하는 /:parameter에다가 제가 잘못된 값을 입력하는 것인지, 유저 내보내기 기능이 구현이 안되어서 질문을 드립니다~! * 아래의 server측 router에, "workspaces/:workspace/channels/:channel/members/:id" * 아래의 client측 post요청 보냈습니다. "axios.post(`/api/workspaces/${workspace}/channels/${channel}/members/${id}` 이 중에서, * :workspace , :channel 에는 const { workspace , channel } = useParams() 에서 값을 구해서 넣었습니다. * :id 에는 채널에 들어있는 유저 정보를 가져온 usersData const { data: usersData , revalidate: revalidateMembers } = useSWR( myData ? `/api/workspaces/${workspace}/channels/${channel}/members` : null, fetcher ) useSWR로 가져온 usersData에 들어있는 각종 id 값들을 다 구해서 넣어보았는데도, 기능이 작동이 안되는 듯 해서 ㅜㅜ 정리정돈되지 않은 질문 죄송합니다 ㅜㅜ
안녕하세요 영한님 질문이 있습니다. 회원가입을 할 때 비밀번호를 입력하는 예제를 만들어 보려고 합니다. 회원가입 시에 비밀번호를 입력하고 비밀번호 확인을 입력하여 둘이 같으면 회원가입을 요청하도록 로직을 짜려고 하는데, 이 로직을 어느 계층에 넣어야 할지 고민이 됩니다. 비밀번호 확인이라는 칼럼을 멤버 클래스에 추가하지 않고 클라이언트에서 넘겨준 데이터를 확인만 하고 버리려고 하는데 그러면 MemberApiController에서 직접 처리를 해야하는 걸까요? 감사합니다.
# n, m=map(int, input().split()) # Music=list(map(int, input().split())) maxx=max(Music) lt=1 rt=sum(Music) res=0 while lt<=rt: mid=(lt+rt)//2 if mid>=maxx and Count(mid)<=m: res=mid rt=mid-1 else: lt=mid+1 print(res) maxx=max(Music) 을 구해서 노래를 잘라 담을 수 없으니 가장 긴 노래를 기준으로 if문에서 조건을 설정했습니다. 길이의 최솟값이 [1,2, ... ,8,9]중에 9인데 처음부터 lt를 1이 아닌 maxx값으로 시작하면 안될까요?
안녕하세요. 우선 좋은 강의 감사합니다. 덕분에 2주만에 초급, 중급까지 완강해버렸습니다 ㅎㅎ 질문은 Vue.js로 개발할 때 강의처럼 간단한 로직을 만들면서 Vuex로 조금씩 변경하는지, 아니면 처음부터 Vuex를 적용해서 개발을 하시는지 궁금합니다. 물론 초기 설계에 따라 다르겠지만, 실무 경험자께서 실제로 겪어보신 것이 궁금하네요. 개인적으로 앞으로 회사에서 프론트엔드 개발할 일이 많은데 생각이 복잡합니다 ㅎㅎ 읽어주셔서 감사하며, 답변 기다리겠습니다!
안녕하세요 강사님. 수업 내용의 docker-compose.yml와 동일하게 작성하여 docker-compose up 을 해보았지만, 웹 브라우저 접속시 Error establishing a database connection 메시지를 띄우면서 접속되지 않습니다. 로그에는 [Note] Access denied for user 'XXXX'@'172.19.0.3' (using password: YES) 메시지가 남습니다. 여기 다른 분이 질문하신 내용을 보니 댓글에 WORDPRESS_DB_USER : wordpress 내용을 추가하면 되다고 하여 해보았지만 동일한 결과입니다. 제가 다르게 적은 부분은 volumes: 부분에 디렉토리 path 밖에 없는데, 혹시 추가로 적용해야되는 내용이 있는 건가요? 감사합니다.
안녕하세요? 영한님. 오랜만에 올립니다. resources/templates/basic/addForm.html 에서, [취소] button 부분: th:onclick="|location.href='@{/basic/items}'|" 경로에 @{..} 쓰지 않고, th:onclick="|location.href='/basic/items'|" 로 써도 나중에 소스 보기하면 둘 다 똑 같이 보입니다. 이렇게요, onclick="location.href='/basic/items'" 그렇다면, 굳이 @{..} 를 쓰지 않아도 되는 것 아닐까요? 강의 중에 이미 말씀하신 건지 모르겠지만, 질문 올립니다. ( Spring MVC 강의 질문이 너무 없어서 채워 드리려 적는 것, 아닙니다.^^)
안녕하세요! 강의에서 개발환경(vscode) 부분 듣는데, vscode extension에 들어가서 python 검색하고 설치하는데 Error while installing 'Python' extension. Please check the log for more details. 이렇게 뜨고 설치가 되지 않아요ㅠㅠ 감사합니다ㅠㅠ
안녕하세요 영한님 강의 너무 잘 보고 있습니다 :) 다름이 아니라, 우선 강의에서는 같은 타입의 빈들을 모두 컬렉션으로 묶어서 한 번에 가져오는데 만약, 모든 빈은 불필요하고 이중에서 또 일부만 차용해서 사용하고 싶다면 어떤식으로 진행하면 될 까요? 우선, 개인적인 생각으로 일부만 차용한다는건 `설계 미스`+`객체지향적으로 코딩을 못해서` 나온 결과일 것 같은데 그래도 혹여나 이런 상황이 오면 어떻게 해결해야 할지 인사이트를 얻기 위해서 질문 드립니다 :)
App폴더의 index.tsx를 그냥 client.tsx가 있는 root경로로 꺼내서 app.tsx로 쓰려고 했는데, ERROR in ./client.tsx 7:0-22 Module not found: Error: Can't resolve 'App' in Parsed request is a module using description file: Field 'browser' doesn't contain a valid alias configuration 이런 에러가 떳는데 꼭 app폴더라는 파일안에 있어야 되는건가요? 아니면 웹팩설정을 어떻게 하면 바꿀수 있는건가요?