• Members 2 posts
    May 14, 2017, 11:18 a.m.

    Hi Rafal, many thanks for your help yesterday.

    One minor request - when setting up a project can we specify special characters with the project name...such as _ or -

  • May 14, 2017, 3:33 p.m.

    Not really. Project name is the name of the module that gets generated for it, and it has to meet python requirements for module name:

    Package and Module Names Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.

    Since module names are mapped to file names, and some file systems are case insensitive and truncate long names, it is important that module names be chosen to be fairly short -- this won't be a problem on Unix, but it may be a problem when the code is transported to older Mac or Windows versions, or DOS.

    If you name your module something-else, you'll need to resort to __import__('something-else') calls to import your module as import something-else will produce syntax error. Underscore is doable tough, and I'll be willing to merge PR like such if one arrives. Misago defines the misago.core.setup.validate_project_name function for module name validation.

    On sidenote, may I ask what are you trying to achieve with this?

  • Members 2 posts
    May 14, 2017, 9:49 p.m.

    I'm setting up a blog and would like a discussion forum to work alongside the blog. I want to extend my primary project name with the _misago ident just to establish that this is the misago forum app.

  • May 14, 2017, 11:18 p.m.

    Well, simplest way about it would be to create it without underscore and then find and replace in newly created directory and finally rename the dir too.

    Also keep on mind that name of the top directory created doesnt have any meaning to Python or Misago, because it's not module. Its the dir inside it that matters because it has 'ini.py' inside of it.