실습 중 질문이 있습니다.
558
작성한 질문수 6
안녕하세요. ipython에서 실습 중 에러가 발생합니다.
먼저, application.py는 다음과 같이 작성하였습니다.
그리고 아래는 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 파일은 생성된 상황입니다.
보시고 도움 부탁드립니다~!
답변 3
가상환경 설정시 문의
0
4
1
개발환경에 대해셔 설명부탁드립니다.
0
10
1
파트9 강의는 언제 오픈하시나요
0
14
2
20년 4,5회 13번
0
9
1
작업형 2 기출7회분에서
0
14
1
11. 데이터를 목록화하는 리스트와 튜플 에서 콘솔 실행시
0
17
1
ZIP 파일
0
21
2
26강 13F 강의 불일치 및 질문 요청
0
25
3
[업로드오류] 강의 내용과 제목 불일치
0
20
2
(등록 웹 페이지 개발 3) relationship등록관련 경고문구
0
289
1
(many to many)에러문구 관련
0
369
1
(one-to-many) admin.users.all() 시 출력화면
0
378
1
[db, model2] inflearn 테이블 생성오류시 참고하세요.
0
256
1
use inflearn;
0
313
1
공유 템플릿
0
344
1
run이 작동이 안됩니다ㅠㅠ
0
277
1
서버를 열었을때 404 오류가 납니다
0
277
1
BluePrint 질문입니다.
0
322
1
Project.query.get(1) 질문
0
360
2
db, model2에서 db.create_all()수행시 나타나는 오류입니다..
0
528
1
sql db중에 id 1의 정보가없습니다
0
290
1
relationship 코드위치.
0
167
1
ForeignKey 에러 관련.
0
241
3
Delete가아니고 Update강의가 올라와있네요
0
221
2





