Example #1
0
def get_basic_info():
    """
        Here we're asking the user for:
        - city
        - country
        - date
        - url
        - event_email
        And return all these information.
    """
    click.echo(
        "Hello there! Let's create new Django Girls event! So exciting!")
    click.echo("Let's start with some basics.")
    city = click.prompt(click.style(
        "What is the name of the city?", bold=True, fg='yellow'))
    country = click.prompt(click.style(
        "What is the name of the country?", bold=True, fg='yellow'))

    date = gather_event_date_from_prompt()

    url = click.prompt(click.style(
        "What should be the URL of website? djangogirls.org/xxxx", bold=True, fg='yellow'))
    event_mail = click.prompt(click.style(
        "What is the mail adress of the event? [email protected]", bold=True, fg='yellow'))
    click.echo("Ok, got that! Your new event will happen in {0}, {1} on {2}".format(
        city, country, date))

    return (city, country, date, url, event_mail)
Example #2
0
def gather_information():
    click.echo("Hello there sunshine! We're gonna copy an event website now.")

    event = get_event(
        click.prompt(
            click.style(
                "First, give me the latest ID of the Event "
                "object you want to copy",
                bold=True,
                fg='yellow')))

    while not event:
        event = get_event(click.prompt("Wrong ID! Try again"))

    click.echo("Ok, we're copying {}, {}".format(event.city, event.country))

    number = click.prompt(
        click.style(
            "What is the number of the event in this city? "
            "If this is a second event, write 2. If third, then 3. You got it",
            bold=True,
            fg='yellow'))

    date = gather_event_date_from_prompt()

    click.echo("The current team is: " +
               ", ".join(str(organizer) for organizer in event.team.all()))

    new_team = click.confirm(click.style(
        "Do you need to change the whole team?", bold=True, fg='yellow'),
                             default=False)

    return (event, number, date, new_team)
Example #3
0
def get_basic_info():
    """
        Here we're asking the user for:
        - city
        - country
        - date
        - url
        - event_email
        And return all these information.
    """
    click.echo(
        "Hello there! Let's create new Django Girls event! So exciting!")
    click.echo("Let's start with some basics.")
    city = click.prompt(
        click.style("What is the name of the city?", bold=True, fg='yellow'))
    country = click.prompt(
        click.style("What is the name of the country?", bold=True,
                    fg='yellow'))

    date = gather_event_date_from_prompt()

    url = click.prompt(
        click.style("What should be the URL of website? djangogirls.org/xxxx",
                    bold=True,
                    fg='yellow'))
    event_mail = click.prompt(
        click.style(
            "What is the mail adress of the event? [email protected]",
            bold=True,
            fg='yellow'))
    click.echo(
        "Ok, got that! Your new event will happen in {0}, {1} on {2}".format(
            city, country, date))

    return (city, country, date, url, event_mail)
Example #4
0
def gather_information():
    click.echo("Hello there sunshine! We're gonna copy an event website now.")

    event = get_event(
        click.prompt(click.style("First, give me the latest ID of the Event "
        "object you want to copy", bold=True, fg='yellow'))
    )

    while not event:
        event = get_event(click.prompt("Wrong ID! Try again"))

    click.echo("Ok, we're copying {}, {}".format(
        event.city, event.country))

    number = click.prompt(click.style("What is the number of the event in this city? "
        "If this is a second event, write 2. If third, then 3. You got it", bold=True, fg='yellow')
    )

    date = gather_event_date_from_prompt()

    click.echo("The current team is: " + ", ".join(
        str(organizer) for organizer in event.team.all()))

    new_team = click.confirm(click.style(
        "Do you need to change the whole team?", bold=True, fg='yellow'), default=False
    )

    return (event, number, date, new_team)
Example #5
0
def gather_information():
    click.echo("Hello there sunshine! We're gonna copy an event website now.")

    event = get_event(
        click.prompt(
            "First, give me the ID of the Event object we're gonna copy. "
            "Don't mix it up with EventPage object. If there is more than "
            "one event in this city already, give me ID of the latest one"))

    while not event:
        event = get_event(click.prompt("Wrong ID! Try again"))

    number = click.prompt(
        "What is the number of the event in this city? "
        "If this is a second event, write 2. If third, then 3. You got it")

    date = gather_event_date_from_prompt()

    return (event, number, date)
Example #6
0
def gather_information():
    click.echo("Hello there sunshine! We're gonna copy an event website now.")

    event = get_event(
        click.prompt(
            "First, give me the ID of the Event object we're gonna copy. "
            "Don't mix it up with EventPage object. If there is more than "
            "one event in this city already, give me ID of the latest one"
        )
    )

    while not event:
        event = get_event(click.prompt("Wrong ID! Try again"))

    number = click.prompt(
        "What is the number of the event in this city? "
        "If this is a second event, write 2. If third, then 3. You got it"
    )

    date = gather_event_date_from_prompt()

    return (event, number, date)