-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Fullname and Nickname Feature to User Profiles #2575
Open
annapurna-gupta
wants to merge
2
commits into
Open-MSS:develop
Choose a base branch
from
annapurna-gupta:feature/add-fullname-nickname
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+438
−186
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
mslib/mscolab/migrations/versions/a63201ddec7a_to_version_next_major_version.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"""To version <next-major-version> | ||
|
||
Revision ID: a63201ddec7a | ||
Revises: 922e4d9c94e2 | ||
Create Date: 2024-11-28 14:11:53.302308 | ||
|
||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
import mslib.mscolab.custom_migration_types as cu | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'a63201ddec7a' | ||
down_revision = '922e4d9c94e2' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('users', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('fullname', sa.String(length=255), nullable=True)) | ||
batch_op.add_column(sa.Column('nickname', sa.String(length=255), nullable=True)) | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('users', schema=None) as batch_op: | ||
batch_op.drop_column('nickname') | ||
batch_op.drop_column('fullname') | ||
|
||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,66 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Form implementation generated from reading ui file 'mslib/msui/ui/ui_add_user.ui' | ||
# Form implementation generated from reading ui file 'ui_add_user_dialog.ui' | ||
# | ||
# Created by: PyQt5 UI code generator 5.9.2 | ||
# Created by: PyQt5 UI code generator 5.15.9 | ||
# | ||
# WARNING! All changes made in this file will be lost! | ||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is | ||
# run again. Do not edit this file unless you know what you are doing. | ||
|
||
|
||
from PyQt5 import QtCore, QtGui, QtWidgets | ||
|
||
|
||
class Ui_addUserDialog(object): | ||
def setupUi(self, addUserDialog): | ||
addUserDialog.setObjectName("addUserDialog") | ||
addUserDialog.resize(375, 232) | ||
addUserDialog.resize(375, 293) | ||
self.gridLayout = QtWidgets.QGridLayout(addUserDialog) | ||
self.gridLayout.setObjectName("gridLayout") | ||
self.verticalLayout = QtWidgets.QVBoxLayout() | ||
self.verticalLayout.setObjectName("verticalLayout") | ||
self.formLayout = QtWidgets.QFormLayout() | ||
self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.ExpandingFieldsGrow) | ||
self.formLayout.setLabelAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) | ||
self.formLayout.setHorizontalSpacing(7) | ||
self.formLayout.setVerticalSpacing(14) | ||
self.formLayout.setObjectName("formLayout") | ||
self.usernameLabel = QtWidgets.QLabel(addUserDialog) | ||
self.usernameLabel.setObjectName("usernameLabel") | ||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.usernameLabel) | ||
self.username = QtWidgets.QLineEdit(addUserDialog) | ||
self.username.setObjectName("username") | ||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.username) | ||
self.fullnamelabel = QtWidgets.QLabel(addUserDialog) | ||
self.fullnamelabel.setObjectName("fullnamelabel") | ||
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.fullnamelabel) | ||
self.fullname = QtWidgets.QLineEdit(addUserDialog) | ||
self.fullname.setText("") | ||
self.fullname.setObjectName("fullname") | ||
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.fullname) | ||
self.emailIDLabel = QtWidgets.QLabel(addUserDialog) | ||
self.emailIDLabel.setObjectName("emailIDLabel") | ||
self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.emailIDLabel) | ||
self.emailid = QtWidgets.QLineEdit(addUserDialog) | ||
self.emailid.setObjectName("emailid") | ||
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.emailid) | ||
self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.emailid) | ||
self.passwordLabel = QtWidgets.QLabel(addUserDialog) | ||
self.passwordLabel.setObjectName("passwordLabel") | ||
self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.passwordLabel) | ||
self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.passwordLabel) | ||
self.password = QtWidgets.QLineEdit(addUserDialog) | ||
self.password.setEchoMode(QtWidgets.QLineEdit.Password) | ||
self.password.setObjectName("password") | ||
self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.password) | ||
self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.password) | ||
self.confirmPasswordLabel = QtWidgets.QLabel(addUserDialog) | ||
self.confirmPasswordLabel.setObjectName("confirmPasswordLabel") | ||
self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.confirmPasswordLabel) | ||
self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.confirmPasswordLabel) | ||
self.rePassword = QtWidgets.QLineEdit(addUserDialog) | ||
self.rePassword.setEchoMode(QtWidgets.QLineEdit.Password) | ||
self.rePassword.setObjectName("rePassword") | ||
self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.rePassword) | ||
self.emailIDLabel = QtWidgets.QLabel(addUserDialog) | ||
self.emailIDLabel.setObjectName("emailIDLabel") | ||
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.emailIDLabel) | ||
self.usernameLabel = QtWidgets.QLabel(addUserDialog) | ||
self.usernameLabel.setObjectName("usernameLabel") | ||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.usernameLabel) | ||
self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.rePassword) | ||
self.verticalLayout_2 = QtWidgets.QVBoxLayout() | ||
self.verticalLayout_2.setObjectName("verticalLayout_2") | ||
self.formLayout.setLayout(6, QtWidgets.QFormLayout.FieldRole, self.verticalLayout_2) | ||
self.verticalLayout.addLayout(self.formLayout) | ||
self.buttonBox = QtWidgets.QDialogButtonBox(addUserDialog) | ||
self.buttonBox.setOrientation(QtCore.Qt.Horizontal) | ||
|
@@ -56,18 +70,20 @@ def setupUi(self, addUserDialog): | |
self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1) | ||
|
||
self.retranslateUi(addUserDialog) | ||
self.buttonBox.accepted.connect(addUserDialog.accept) | ||
self.buttonBox.rejected.connect(addUserDialog.reject) | ||
self.buttonBox.accepted.connect(addUserDialog.accept) # type: ignore | ||
self.buttonBox.rejected.connect(addUserDialog.reject) # type: ignore | ||
QtCore.QMetaObject.connectSlotsByName(addUserDialog) | ||
|
||
def retranslateUi(self, addUserDialog): | ||
_translate = QtCore.QCoreApplication.translate | ||
addUserDialog.setWindowTitle(_translate("addUserDialog", "Add user")) | ||
self.usernameLabel.setText(_translate("addUserDialog", "Username:")) | ||
self.username.setPlaceholderText(_translate("addUserDialog", "John Doe")) | ||
self.fullnamelabel.setText(_translate("addUserDialog", "Fullname:")) | ||
self.fullname.setPlaceholderText(_translate("addUserDialog", "John Michael Doe")) | ||
self.emailIDLabel.setText(_translate("addUserDialog", "Email:")) | ||
self.emailid.setPlaceholderText(_translate("addUserDialog", "[email protected]")) | ||
self.passwordLabel.setText(_translate("addUserDialog", "Password:")) | ||
self.password.setPlaceholderText(_translate("addUserDialog", "Your password")) | ||
self.confirmPasswordLabel.setText(_translate("addUserDialog", "Confirm Password:")) | ||
self.rePassword.setPlaceholderText(_translate("addUserDialog", "Confirm your password")) | ||
self.emailIDLabel.setText(_translate("addUserDialog", "Email:")) | ||
self.usernameLabel.setText(_translate("addUserDialog", "Username:")) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because you change the dbase model, you need to do additional steps, see
https://github.com/Open-MSS/MSS/blob/develop/docs/development.rst#changing-the-database-model
when that is not done, a
annapurna-gupta/MSS$ python mslib/mscolab/mscolab.py db --seed
crashes withsqlite3.OperationalError: table users has no column named fullname
also it may be useful to change the seed.py to add some of this data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have generated the migration script but while applying it to database i am facing import error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please show the failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please show your PYTHONPATH
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
likly PYTHONPATH should show D:\LOCAL_CODE COPY\MSS
I think on windows you can use
setx PYTHONPATH D:\LOCAL_CODE COPY\MSS
currently python can't find mslib. ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.