Commit 7c3ad8d0 authored by Shashank Kumar's avatar Shashank Kumar

conflict resolved

parents 8a2db850 d06b7e10
New Contributor Wizard v0.0.1
## August 13 2018
- Fixing bug in Encryption/Tools, 'Create Key Pair' Tool (Shashank Kumar - realslimshanky)
- Adding description to all the course ware modules by updating `module_data.json` (Shashank Kumar - realslimshanky)
- Refactored `module_box` module to support description on the UI (Shashank Kumar - realslimshanky)
## August 11 2018
- Updating Sign Up module to allow different timezones from the user (Shashank Kumar - realslimshanky)
## August 7 2018
- Adding `Contribute To Tutorials` documentation (Shashank Kumar - realslimshanky)
- Adding `Contribute To Tools` documentation (Shashank Kumar - realslimshanky)
## August 6 2018
- How To Use module updated with a tutorial on how to get started with the application (Shashank Kumar - realslimshanky)
- Tutorial Parser refactored to validate invalid keys and prompt error message (Shashank Kumar - realslimshanky)
- Tutorial Parser refactored to support both Local and Online images (Shashank Kumar - realslimshanky)
- Tutorial Parser refactored to support uniform JSON object with `type` and `content` keys. (Shashank Kumar - realslimshanky)
- Minor change in Tutorial Parser by changing `content` key to `lesson` for better context (Shashank Kumar - realslimshanky)
## July 30 2018
- Generic Menus added in module_box to be used in any of the course modules for Menu navigation, Tools Menu and Tutorials Menu (Shashank Kumar - realslimshanky)
......
[
{
"application_settings": {
"description": "",
"tutorials": [],
"tools": []
}
},
{
"blog": {
"description": "A blog can be seen as a perspective of the author about a particular topic they want the world to know. It also serves as a reminder to self which helps remember past concepts and accomplishments. And, it can also be seen as a place to show off your cool projects to the world. In Blog section, you'll learn about what are the various ways to setup a blog, you'll learn about how to put the blog out for the world to see and much more.",
"tutorials": [],
"tools": []
}
},
{
"cli": {
"command_line_inteface": {
"description": "Command Line Interfaces are one of the essential tool used by a developer on a daily basis irrespective of their domain of work. This makes it the first thing to learn before even starting a programming language. In Command Line Interface section, you'll learn about the basics and few hacks to improve productivity.",
"tutorials": [],
"tools": []
}
},
{
"communication": {
"description": "When in an organization, communication plays a vital role in deciding how smooth the team will function. Whether team is comprised of just 2 contributors or more than that. Improving communication can bring a surprising change in time taken while querying peers for doubt, reviews and feedbacks. In this communication section, you'll learn about different forms of communication channel an organization uses and guidelines for communication.",
"tutorials": [],
"tools": []
}
},
{
"encryption": {
"description": "You might have heard about data being the key to today's world. More so, within an organization and in your own life you might have to store and share sensetive information with your peers. Hence, it becomes important that you use best practices in order to better encrypt/decrypt the data in consideration. This Encryption section, you'll learn more about cryptography and encryption. You'll even get to create and manage your own key pair, encrypt and decrypt messages.",
"tutorials": [
{
"title": "Encryption 101",
......@@ -53,30 +58,35 @@
},
{
"how_to_use": {
"description": "How To Use section contains a simple description about the application and different sections in it.",
"tutorials": [],
"tools": []
}
},
{
"profile_settings": {
"description": "",
"tutorials": [],
"tools": []
}
},
{
"theme_settings": {
"description": "",
"tutorials": [],
"tools": []
}
},
{
"vcs": {
"version_control_system": {
"description": "While collaborating, a Version Control System helps in managing the codebase shared across contributors for a project, smooth out the development process varying different versions and gives enough freedom for a person to experiment with a new feature without much hassle. In Version Control System, you'll learn about how it works, what are the various ways of using VCS and get to work on a sample repository as well.",
"tutorials": [],
"tools": []
}
},
{
"way_ahead": {
"description": "If you have a general idea about all the course ware sections above this, then mark yourself ready for the real world projects and collaborating with different organizations. This section will help you understand how open source organizations like Debian work, how to contribute to such organizations, what are the various programs like Google Summer of Code or Outreachy and much more.",
"tutorials": [],
"tools": []
}
......
......@@ -73,15 +73,15 @@ Once you have listed, open the module inside the application, say `Encryption` g
After listing your tutorial, it's now time to create your Tutorial JSON. Let's say you want to build Tutorial for `Encryption` module and you have listed your tutorial under `encryption` key on `data/module_data.json` following Step 2. Now, you'll have to find the correct folder to put your JSON file (which we'll be creating in later step). Below is a table to help you out.
| Module in which you want to add your Tutorial | Folder to add your Tutorial JSON file |
| --------------------------------------- | -------------------------------- |
| Blog | `modules/course_modules/blog/tutorials/` |
| CLI | `modules/course_modules/cli/tutorials/` |
| Communication | `modules/course_modules/communication/tutorials/` |
| Encryption | `modules/course_modules/encryption/tutorials/` |
| How To Use | `modules/course_modules/how_to_use/tutorials/` |
| VCS | `modules/course_modules/vcs/tutorials/` |
| Way Ahead | `modules/course_modules/way_ahead/tutorials/` |
| Module in which you want to add your Tutorial | Folder to add your Tutorial JSON file |
| --------------------------------------------- | ------------------------------------------------- |
| Blog | `modules/course_modules/blog/tutorials/` |
| CLI | `modules/course_modules/cli/tutorials/` |
| Communication | `modules/course_modules/communication/tutorials/` |
| Encryption | `modules/course_modules/encryption/tutorials/` |
| How To Use | `modules/course_modules/how_to_use/tutorials/` |
| VCS | `modules/course_modules/vcs/tutorials/` |
| Way Ahead | `modules/course_modules/way_ahead/tutorials/` |
## Step 4 - Creating Tutorial JSON
......@@ -106,25 +106,25 @@ Now try to `Open` `My Awesome Tutorial` from the Tutorial Menu as seen above. Wh
## Step 5 - Updating The Tutorial JSON
Each Tutorial JSON file is a array of `{}` obejcts. And each of those object must contain one and only one key i.e. `content` and value of this key should also be a `[]` object.
Each Tutorial JSON file is a array of `{}` obejcts. And each of those object must contain one and only one key i.e. `lesson` and value of this key should also be a `[]` object.
Each `{}` with a `content` represents a lesson in tutorial. Copy the code below and replace it with what you have in your Tutorial JSON file, restart the application and open your tutorial again.
Each `{}` with a `lesson` represents a lesson in tutorial. Copy the code below and replace it with what you have in your Tutorial JSON file, restart the application and open your tutorial again.
```json
[
{
"content": []
"lesson": []
},
{
"content": []
"lesson": []
},
{
"content": []
"lesson": []
}
]
```
We can see there are 3 different Lessons without any content and there's a handy navigation to switch between any of them. Cool right? Your first `content` becomes Lesson 1, second `content` becomes Lesson 2 and so on.
We can see there are 3 different Lessons without any content and there's a handy navigation to switch between any of them. Cool right? Your first `lesson` becomes Lesson 1, second `lesson` becomes Lesson 2 and so on.
Now when you are creating a Tutorial, you would like to add some content inside your Lesson, that's what we define in `[]`.
......@@ -139,10 +139,10 @@ A simple Text can be added to Lesson by using the following code
```json
[
{
"content": [
"lesson": [
{
"type": "text",
"text": "This is a text"
"content": "This is a text"
}
]
},
......@@ -153,7 +153,7 @@ This will result in
![Text Content](https://i.imgur.com/RtZECpK.png)
So, you have to add a `{}` object inside the `[]` of a Lesson. The compulsory key is `type` whose value should be `text`. Following this, add another key `text` whose value should contain the text you want to display in the lesson.
So, you have to add a `{}` object inside the `[]` of a Lesson. The compulsory key is `type` whose value should be `text`. Following this, add another key `content` whose value should contain the text you want to display in the lesson.
### 2. ** Image **
......@@ -162,10 +162,10 @@ Adding an image is just as simple like adding a text. Simply use below code to k
```json
[
{
"content": [
"lesson": [
{
"type": "image",
"url": "https://cdn.pixabay.com/photo/2018/07/28/19/57/lunar-eclipse-3568835_960_720.jpg"
"content": "https://cdn.pixabay.com/photo/2018/07/28/19/57/lunar-eclipse-3568835_960_720.jpg"
}
]
},
......@@ -178,7 +178,7 @@ This will result in
You can also store the image inside the repository, use `ui/assets/images` directory and place the url as absolute path to the image file. For example, if the image named as `myimage.jpg`, the absolute path would be `ui/assets/images/myimage.jpg`.
So this time, `type` key has value `image` and an additional key is `url` which should contain the url of the image you want to display. If the image doesn't load, try to host the image yourself online somewhere and replace the `url`.
So this time, `type` key has value `image` and an additional key is `content` which should contain the url of the image you want to display. If the image doesn't load, try to host the image yourself online somewhere and replace the url in `content`.
### 3. ** Code **
......@@ -187,10 +187,10 @@ Code snippets can also be added to Lesson which can be copied easily right from
```json
[
{
"content": [
"lesson": [
{
"type": "code",
"code": "man ls"
"content": "man ls"
}
]
},
......@@ -201,7 +201,7 @@ This will result in
![Code Content](https://i.imgur.com/qpwdZVy.png)
Now you might have guessed what `type` we are using. And similar to above convention, add additional key `code` and value should be whatever text you want the user to copy.
Now you might have guessed what `type` we are using. And similar to above convention, add additional key `content` and value should be whatever text you want the user to copy.
### 4. ** Question **
......@@ -210,12 +210,14 @@ Now this one is a little advance content type that the others. Let's first use t
```json
[
{
"content": [
"lesson": [
{
"type": "question",
"question": "Is Linux a Monolithic Kernal? Answer yes or no.",
"answer": "yes",
"hint": "do some research online"
"content": {
"question": "Is Linux a Monolithic Kernal? Answer yes or no.",
"answer": "yes",
"hint": "do some research online"
}
}
]
},
......@@ -235,44 +237,46 @@ Also, below is the example of how you can add multiple content to a single lesso
```json
[
{
"content": [
"lesson": [
{
"type": "text",
"text": "This is my AWESOME tutorial. Checkout the image below!"
"content": "This is my AWESOME tutorial. Checkout the image below!"
},
{
"type": "image",
"url": "https://cdn.pixabay.com/photo/2017/01/16/19/17/horses-1984977_960_720.jpg"
"content": "https://cdn.pixabay.com/photo/2017/01/16/19/17/horses-1984977_960_720.jpg"
}
]
},
{
"content": [
"lesson": [
{
"type": "text",
"text": "Another awesome lesson for you!"
"content": "Another awesome lesson for you!"
},
{
"type": "image",
"url": "https://cdn.pixabay.com/photo/2014/11/29/09/56/sleigh-ride-549727_960_720.jpg"
"content": "https://cdn.pixabay.com/photo/2014/11/29/09/56/sleigh-ride-549727_960_720.jpg"
}
]
},
{
"content": [
"lesson": [
{
"type": "text",
"text": "WOW! You made it to the end!"
"content": "WOW! You made it to the end!"
},
{
"type": "question",
"question": "How many horses did you see?",
"answer": "4",
"hint": "read the tutorial from the start"
"content": {
"question": "How many horses did you see?",
"answer": "4",
"hint": "read the tutorial from the start"
}
},
{
"type": "text",
"text": "Thank you for visiting my tutorial - Shashank"
"content": "Thank you for visiting my tutorial - Shashank"
}
]
}
......
'''
Modules containing CLI classes
Modules containing CommandLineInterface classes
'''
from kivy.uix.boxlayout import BoxLayout
from modules.module_box.module_box import ModuleBox
class CLI(BoxLayout):
class CommandLineInterface(BoxLayout):
'''
CLI class for tutorials and tools
CommandLineInterface class for tutorials and tools
'''
def __init__(self, **kwargs):
super(CLI, self).__init__(**kwargs)
self.module_box = ModuleBox("cli")
super(CommandLineInterface, self).__init__(**kwargs)
self.module_box = ModuleBox("command_line_inteface")
self.add_widget(self.module_box)
[
{
"content": [
"lesson": [
{
"type": "image",
"url": "http://www.bigfoto.com/lines-image.jpg"
"content": "ui/assets/images/encryption_101_1.jpg"
},
{
"type": "text",
"text": "Welcome to Encryption 101. This is just to get you started with what the term 'Encryption' means and how it is practiced in real life. Roughly speaking, encryption is the problem of how two parties can communicate in secret in the presence of an eavesdropper. The main goals of this chapter are to develop a meaningful and useful definition of what we are trying to achieve, and to take some first steps in actually achieving it. "
"content": "Welcome to Encryption 101. This is just to get you started with what the term 'Encryption' means and how it is practiced in real life. Roughly speaking, encryption is the problem of how two parties can communicate in secret in the presence of an eavesdropper. The main goals of this chapter are to develop a meaningful and useful definition of what we are trying to achieve, and to take some first steps in actually achieving it. "
},
{
"type": "question",
"question": "So, what can you secure using Encryption?",
"answer": "Communication",
"hint": "Read the above paragraph for answer"
"content": {
"question": "So, what can you secure using Encryption?",
"answer": "Communication",
"hint": "Read the above paragraph for answer"
}
}
]
},
{
"content": [
"lesson": [
{
"type": "text",
"text": "Now, let's take a real life example to understand where Encryption can be used."
"content": "Now, let's take a real life example to understand where Encryption can be used."
},
{
"type": "text",
"text": "Suppose Alice and Bob share a secret key k, and Alice wants to transmit a message m to Bob over a network while maintaining the secrecy of m in the presence of an eavesdropping adversary. This tutorial begins the development of basic techniques to solve this problem. Besides transmitting a message over a network, these same techniques allow Alice to store a file on a disk so that no one else with access to the disk can read the file, but Alice herself can read the file at a later time."
"content": "Suppose Alice and Bob share a secret key k, and Alice wants to transmit a message m to Bob over a network while maintaining the secrecy of m in the presence of an eavesdropping adversary. This tutorial begins the development of basic techniques to solve this problem. Besides transmitting a message over a network, these same techniques allow Alice to store a file on a disk so that no one else with access to the disk can read the file, but Alice herself can read the file at a later time."
},
{
"type": "question",
"question": "What Alice and Bob can use to secure message while transmission?",
"answer": "A secret key",
"hint": "Read the above paragraph for answer"
"content": {
"question": "What Alice and Bob can use to secure message while transmission?",
"answer": "A secret key",
"hint": "Read the above paragraph for answer"
}
}
]
}
......
[
{
"lesson": [
{
"type": "text",
"content": "[size=40]Welcome to New Contributor Wizard[/size]"
},
{
"type": "text",
"content": "This is 'How To Use', here you'll learn about how to use this application to get the best out of it. Let's first understand why you should use this application?"
},
{
"type": "text",
"content": "[size=25]Why you should use this application?[/size]"
},
{
"type": "text",
"content": "New Contributor Wizard originated as a [ref=https://summerofcode.withgoogle.com/projects/#5056989357408256]Google Summer of Code 2018[/ref] project under Debian. It is a initiative to create an application which can provide all the resources to a person in order to help them out with Open Source contributions."
},
{
"type": "text",
"content": "For more information regarding the project you can visit project repository on [ref=https://salsa.debian.org/new-contributor-wizard-team/new-contributor-wizard][color=0000ff]https://salsa.debian.org/new-contributor-wizard-team/new-contributor-wizard[/color][/ref]"
},
{
"type": "text",
"content": "Next. We'll look into what all we can learn from this application."
}
]
},
{
"lesson": [
{
"type": "text",
"content": "Now, let's have a look at different modules available for you. If you press the hamburger button available on the top-left corner of the application which looks something like the image below..."
},
{
"type": "image",
"content": "ui/assets/images/how_to_use_1.png"
},
{
"type": "text",
"content": "After clicking on it you will see a sidebar appear from the left which would look something like the image below..."
},
{
"type": "image",
"content": "ui/assets/images/how_to_use_2.png"
},
{
"type": "text",
"content": "You might be overwhelmed by all these options. Next we'll understand what you'll find in all these options."
}
]
},
{
"lesson": [
{
"type": "text",
"content": "Now let's take a look at what each option on the sidebar will teach you."
},
{
"type": "text",
"content": "[size=25]How To Use[/size]\nThis module will help you understand, What this application is, How to use the application and How you can also contribute to the application."
},
{
"type": "text",
"content": "[size=25]Communication[/size]\nThis module will help you understand, How to communicate with your mentors, How to communicate with an organization, What are the various ways of communication used in communities and What are the best practices you should follow while communicating."
},
{
"type": "text",
"content": "[size=25]CLI[/size]\nThis module will help you understand, What is Command Line Interface, Why we use CLI, What are the various ways in which CLI will help you in day to day work and more about CLI hacks."
},
{
"type": "text",
"content": "[size=25]Blog[/size]\nThis module will help you understand, How to write blogs, Why blogging is important, Where to host blogs and more about efficiently bogging."
},
{
"type": "text",
"content": "[size=25]VCS[/size]\nThis module will help you understand, What is Version Control System, How to manage projects efficiently with VCS and How VCS is used to collaborate with other contributors of a project."
},
{
"type": "text",
"content": "[size=25]Encryption[/size]\nThis module will help you understand, What is encryption, Why encrypting your data is important, What are the various ways in which you can do encryption."
},
{
"type": "text",
"content": "[size=25]Way Ahead[/size]\nThis module will help you understand, What are the various ways in which you can start getting involve with different communities, What are the various Open Source competitions which you can take part in like Google Summer of Code and much more."
},
{
"type": "text",
"content": "In the next lesson, we'll look into what are Tools and Tutorials inside every course option on the sidebar."
}
]
},
{
"lesson": [
{
"type": "text",
"content": "If you visit any of the option from the left sidebar (except How To Use), you'll find a bottom navigation like below."
},
{
"type": "image",
"content": "ui/assets/images/how_to_use_3.png"
},
{
"type": "text",
"content": "Tutorials and Tools! You can select either of them by simply clicking on them and a menu will appear just like the image below..."
},
{
"type": "image",
"content": "ui/assets/images/how_to_use_4.png"
},
{
"type": "text",
"content": "Tutorials are a manual about a particular topic which will help you understand the topic. Just like this tutorial which are reading right now which helps you understand how this application works."
},
{
"type": "text",
"content": "Tools for a particular option would be simple tools provided to you in order to do simple tasks related to the option you select. For example, in the image above you can see 'Encryption Tools' menu. Here, all the tools are related to Encryption. Like, 'Enrypt a message' which will allow you to encrypt a message right from this application itself. Cool, right?"
},
{
"type": "text",
"content": "You might have also noticed that Each option in Tutorials or Tools menu has a specific difficulty attached to it. This will help you identify which Tutorials or Tools to start with. A difficulty can be 'Beginner', 'Intermediate' or 'Advance'. Menu items are also colored respectively for visual aid."
},
{
"type": "text",
"content": "That's all you needed to know in order to get started. If you have any more question or problem regarding the application please reach out to the maintainers at [ref=https://salsa.debian.org/new-contributor-wizard-team/new-contributor-wizard][color=0000ff]https://salsa.debian.org/new-contributor-wizard-team/new-contributor-wizard[/color][/ref]"
}
]
}
]
'''
Modules containing How To Use classes
'''
import os
from kivy.uix.boxlayout import BoxLayout
from kivy.lang import Builder
from modules.parsers import tutorial_parser
Builder.load_file('./ui/how_to_use.kv')
......@@ -12,3 +17,10 @@ class HowToUse(BoxLayout):
HowToUser class for introduction on how to user New
Contributor Wizard
'''
def __init__(self, **kwargs):
super(HowToUse, self).__init__(**kwargs)
tutorial_to_import_path = os.path.join('modules', 'course_modules',
'how_to_use', 'how_to_use')
self.add_widget(
tutorial_parser.get_tutorial_widget(tutorial_to_import_path))
......@@ -6,12 +6,12 @@ from kivy.uix.boxlayout import BoxLayout
from modules.module_box.module_box import ModuleBox
class VCS(BoxLayout):
class VersionControlSystem(BoxLayout):
'''
VCS class for tutorials and tools
VersionControlSystem class for tutorials and tools
'''
def __init__(self, **kwargs):
super(VCS, self).__init__(**kwargs)
self.module_box = ModuleBox("vcs")
super(VersionControlSystem, self).__init__(**kwargs)
self.module_box = ModuleBox("version_control_system")
self.add_widget(self.module_box)
......@@ -12,11 +12,13 @@ except ImportError:
logging.info('Dashboard: Install navigationdrawer from garden')
from modules.course_modules.blog.blog import Blog
from modules.course_modules.cli.cli import CLI
from modules.course_modules.command_line_inteface.command_line_inteface import\
CommandLineInterface
from modules.course_modules.communication.communication import Communication
from modules.course_modules.encryption.encryption import Encryption
from modules.course_modules.how_to_use.how_to_use import HowToUse
from modules.course_modules.vcs.vcs import VCS
from modules.course_modules.version_control_system.version_control_system\
import VersionControlSystem
from modules.course_modules.way_ahead.way_ahead import WayAhead
......
'''
Modules containing ModuleBox classes
'''
import json
from kivy.uix.boxlayout import BoxLayout
from kivy.lang import Builder
......@@ -18,9 +20,26 @@ class ModuleBox(BoxLayout):
def __init__(self, root_module_name, **kwargs):
super(ModuleBox, self).__init__(**kwargs)
with open('data/module_data.json') as data:
json_data = json.loads(data.read())
for data in json_data:
if root_module_name in data.keys():
self.module_data = data[root_module_name]
break
module_title = ' '.join(
[name.capitalize() for name in root_module_name.split('_')])
self.ids['module_title'].text = module_title
self.ids['module_description'].text = self.module_data['description']
self.all_options = {
'tutorials': ModuleTutorialsMenu(root_module_name),
'tools': ModuleToolsMenu(root_module_name),
'tutorials': ModuleTutorialsMenu(
root_module_name=root_module_name,
tutorials=self.module_data["tutorials"]),
'tools': ModuleToolsMenu(
root_module_name=root_module_name,
tools=self.module_data["tools"]),
}
self.all_options_items = list(self.all_options.keys())
......@@ -29,6 +48,11 @@ class ModuleBox(BoxLayout):
enable_menu function focuses on concerned menu items or settings which
is clicked and removes focus from all other menu items and settings
'''
if 'module_details_box' in self.ids:
self.ids['module_content_box'].remove_widget(
self.ids['module_content_box'].children[0])
del(self.ids['module_details_box'])
option_to_enable_widget = self.ids[option_to_enable + '_box']
widget_canvas = option_to_enable_widget.canvas
option_to_enable_color = widget_canvas.before.children[0].rgba
......
'''
Modules containing Tools classes for Abstraction
'''
import json
from importlib import import_module
from kivy.lang import Builder
......@@ -29,22 +28,15 @@ class ModuleToolsMenu(BoxLayout):
ModuleToolsMenu class to present Tools Menu
'''
def __init__(self, root_module_name, **kwargs):
def __init__(self, root_module_name, tools, **kwargs):
super(ModuleToolsMenu, self).__init__(**kwargs)
self.all_tools = {}
self.removed_tools_menu = None
self.root_module_name = root_module_name
with open('data/module_data.json') as data:
json_data = json.loads(data.read())
for data in json_data:
if self.root_module_name in data.keys():
self.module_data = data[self.root_module_name]
break
if self.module_data["tools"]:
for tool in self.module_data["tools"]:
if tools:
for tool in tools:
tool_key = '_'.join(tool['title'].lower().split())
self.all_tools[tool_key] = tool
self.populate_tools_menu()
......
......@@ -2,7 +2,6 @@
Modules containing Tutorials classes for Abstraction
'''
import os
import json
from kivy.lang import Builder
from kivy.factory import Factory
......@@ -31,22 +30,15 @@ class ModuleTutorialsMenu(BoxLayout):
ModuleTutorialsMenu class to present Tutorials Menu
'''
def __init__(self, root_module_name, **kwargs):
def __init__(self, root_module_name, tutorials, **kwargs):
super(ModuleTutorialsMenu, self).__init__(**kwargs)
self.all_tutorials = {}
self.removed_tutorials_menu = None
self.root_module_name = root_module_name
with open('data/module_data.json') as data:
json_data = json.loads(data.read())
for data in json_data:
if self.root_module_name in data.keys():
self.module_data = data[self.root_module_name]
break
if self.module_data["tutorials"]:
for tutorial in self.module_data["tutorials"]:
if tutorials:
for tutorial in tutorials:
tutorial_key = '_'.join(tutorial['title'].lower().split())
self.all_tutorials[tutorial_key] = tutorial
self.populate_tutorials_menu()
......
This diff is collapsed.
......@@ -6,7 +6,7 @@ import sqlite3
from settings import get_db_connection, USER_INFOMATION_TABLE
from modules.signup.exceptions import SignUpError
from modules.signup.utils import (
generate_uuid, clean_email, clean_full_name, hash_password
generate_uuid, clean_email, clean_full_name, hash_password, clean_timezone
)
......@@ -28,7 +28,7 @@ def sign_up_user(email, password, full_name, language, timezone):
'password': hash_password(password),
'full_name': clean_full_name(full_name),
'language': language,
'timezone': timezone,
'timezone': clean_timezone(timezone),
}
try:
......