Skip to content
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

Sign up experience is broken #1219

Open
16 tasks
mblayman opened this issue Sep 27, 2024 · 1 comment
Open
16 tasks

Sign up experience is broken #1219

mblayman opened this issue Sep 27, 2024 · 1 comment

Comments

@mblayman
Copy link
Owner

mblayman commented Sep 27, 2024

The login does not send to /start/ anymore. Also, the wizard is too many steps. Even after completing the wizard, there are still more steps (e.g., creating and enrolling a student).

Simplify!

  • Remove old wizard views
  • After first sign in, show a single form that:
    • creates a school year
    • creates a grade level
    • creates a course
    • creates a course task
    • creates a student
    • creates an enrollment
    • welcomes people, explains the app, explains the core data model
  • Add Profile.onboarding_complete (default to False) - initially default to True for exist users
  • Add middleware that launches the form and no other available action
  • Add start view
  • Add template
  • Add landing after completion
  • Bonus: date picker?
  • Bonus: placeholder text that represent the current year and current year + 1 for the start and end date
@mblayman mblayman changed the title Sign up experience seems broken Sign up experience is broken Feb 28, 2025
@pastorhudson
Copy link

For your date picker this might work.

    
def get_school_year_dates():
    """
    Calculate school year start and end dates based on today's date.
    Using typical USA school schedule: Early September to early June.
    """
    current_date = datetime.now()
    current_year = current_date.year

    # Determine which school year we're in based on today's date
    # If we're after June 15, we're in the next school year
    if current_date.month > 6 or (current_date.month == 6 and current_date.day > 15):
        start_year = current_year
        end_year = current_year + 1
    else:
        start_year = current_year - 1
        end_year = current_year

    # Define typical school year dates
    # Start: September 1st of start_year (or closest weekday)
    # End: June 10th of end_year (or closest weekday)
    start_date = date(start_year, 9, 1)
    end_date = date(end_year, 6, 10)

    return {
        "start_date": start_date,
        "end_date": end_date
    }

# Use These fields in your django form
start_date = forms.DateTimeField(label='Start Date',
                                     initial=get_school_year_dates()['start_date'].isoformat(),
                                     widget=forms.DateTimeInput(attrs={'type': 'date'}),
                                     )
end_date = forms.DateTimeField(label='End Date',
                                     initial=get_school_year_dates()['end_date'].isoformat(),
                                   widget=forms.DateTimeInput(attrs={'type': 'date'}),
                                   )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants