-
Notifications
You must be signed in to change notification settings - Fork 344
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
Restructure and reformat the whole project #1004
Comments
I can help in restructuring parts of this project but I think it's a behemoth of task to single handedly solve. |
@AbhijithGanesh, your interest in this issue is welcomed, I am grateful to you. 😌 Unfortunately, the changes that I want to make are related to the other parts of the project. (e.g. moving a class to another file, changing names). So, I think, if more than one person works on this issue, conflicts are inevitable and the whole process takes much time and attention. I've already started working on the tasks and try to complete them as soon as possible. I am going to commit 5-6 light changes as I will be assigned to this issue. Then heavy changes will come. Of course, my finished work won't be perfect, then you can fix my faults and the errors that the project still has. As it stands now, changing and updating the project is more difficult. But, you can work on the parts that aren't related to the backend. For now, you may take responsibility for transferring missing files from the TL;DR: I'm just concerned with the possible conflicts that will be caused by committing by multiple people. |
Points well noted, thanks for putting a word out. Really appreciate the work and efforts mate. I didn't think about the conflicts standpoint. Thank you for the clarification |
One additional goal is to deprecate the |
@gorkemarslan, I appreciate your vision here. This task is comprehensive 😃 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@AbhijithGanesh we are moving away from the SPA front-end architecture. The SPA architecture proved to be overengineering for a project of this size and has introduced a maintenance burden that exceeds our capacity. Instead, we will use more traditional server-rendered templates from Django with sprinkles of JavaScript (such as using HTMX) where relevant. Please see the related discussions below: |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@brylie, I am planning to keep CBVs and remove FBVs for the authentication system. |
Can you explain the terms please. |
@gorkemarslan CBVs sound good to me. If possible, let's deprecate the |
Django uses the concept of Further reading:
|
Oh you were discussing about Class based views. Noted and Thanks Brylie. |
@AbhijithGanesh, CBV stands for Class-Based View, FBV stands for Function-Based Views. They are different paradigms on how to render HTML with |
@brylie, ok, I'll work on that. What about URLs? I, for example, intent to use |
I understand the benefits of CBV , I just didn't know the expansion. Thank you for the explanation |
Sounds good. |
@brylie, I will also remove |
@brylie, I have a question. Account model is defined such that:
In
I think Am I wrong? Which fields do we want the new users to fill? According to your response, I can update the form. |
@gorkemarslan the The name Apologies for the confusion. The model renaming and field refactoring are work-in-progress. |
@brylie, I am going to take care renaming I just realize a point thanks to your reply. I am planning to rename Lastly, If everything's going well, I will tonight commit my changes for the authentication system. (Remove FBVs and related urls, upgrade urls.py to Django 3.2, use CBV, add unit tests for the authentication part.) Thanks for your reply. Now it is much clear. :) |
Yes. We only need to register a |
@gorkemarslan I have merged the changes to rename |
@gorkemarslan sounds good. Keep in mind the idea of a |
Ok, then we shouldn't touch I have two questions:
In
And
It is obvious that the first Moreover, it would be better if we define
So if it is Ok and we won't customize the
|
Once the restructuring is over, can we please have a CD pipeline which can be deployed on heroku? It shall be easier for us to review |
Remove this one from # get custom user model
User = get_user_model() |
Even though we are not currently customizing the
Even though this project isn't "new", it is new in a way since we are still in a prototype stage. So, let's leave the custom |
Just so long as we adhere to the general Django documentation guidelines, except in the case where referring to
|
@brylie, I aim to get started writing unit tests for |
Yes, the |
@brylie, I want to move ProfileSerializer to |
@gorkemarslan, yes. Let's discuss how to divide up task #1026, as it includes moving the |
@brylie, I am planning to send one more PR for this issue. (Update password activation, profile activation etc views and URLs. Add unit testing.) Then you can close this issue. The new issues that have just be created are more comprehensive than this one. Otherwise, we will here have circular dependency problem with the same-concept issues. 😛 |
Please use a GitHub issue keyword to link and close this issue from your pull request. |
I will use. If not, it will be shame on me. You tell me this a couple of times. I will use keywords from now on. :) |
As far as I can audit, I found some issues that need to be done before adding the new features. Otherwise, strong conflicts may appear either now or later on. I am planning to complete all of them as soon as possible, like in a couple of days.
Tasks
1. Update
accounts
appaccounts.models.py
Account
withProfile
as suggested this inactive PR Issue #926 fixed #955. Unfortunately, that PR is unsuccessful. The project won't run with those changes because there is still more untouched stuff related to theAccount
class and also"account"
is present in the comments of the applications. (@brylie could you remove that PR and the issue? I will handle it here and also migrate.)User
model is misused. There is a defined class calledUser
and also a variable calledUser
in the file. Further, we shouldn't useUser = get_user_model()
in theaccounts/models.py
. User class is present in the same file so it is meaningless to call it fromsettings.py
.User
andProfile
(Account
) models. Some fields are redundant, some fields can be added.views
andurls
2. Update
api
appProfile
related classes and functions (e.g.ProfileSerializer
)3. Move all common helper functions to a new project file named
common
PathAndRename
is defined four times in 3 different files. Move this class to thecommon
folder.4. Put
static
files to the correct place5. Remove unused folders, files, and objects.
test_framework
folder is not being used now.6. Update
settings.py
7. Reformat the whole project with
flake8
andblack
I will edit and add new tasks as I detect any issues.
After these changes, the project becomes more convenient to collaborate and contribute.
@brylie, could you assign me to this issue? You can also leave a comment for inactivate issues related to restructuring and reformatting. I will add them to this list.
The text was updated successfully, but these errors were encountered: