From 930f48bde132657cb2e89a283cf0ec4783898a52 Mon Sep 17 00:00:00 2001 From: jacekkalbarczyk Date: Wed, 4 Oct 2017 20:50:49 +0200 Subject: [PATCH 01/31] Adding Docker installation manual --- Docker installation manual | 113 +++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 Docker installation manual diff --git a/Docker installation manual b/Docker installation manual new file mode 100644 index 00000000..7af9d756 --- /dev/null +++ b/Docker installation manual @@ -0,0 +1,113 @@ +Docker and Docker Compose installation manual + +#Source website: +# https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/ + +0. Open terminal. + +1. Uninstall old versions of Docker: + + $ sudo apt-get remove docker docker-engine docker.io + +2. Update the apt package index: + + $ sudo apt-get update + +3.Install packages to allow apt to use a repository over HTTPS: + + $ sudo apt-get install \ + apt-transport-https \ + ca-certificates \ + curl \ + software-properties-common + +4. Add Docker’s official GPG key: + + $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + + Alternative way(in case of emergency): + + Open following URL in browser(Chrome, if possible): https://download.docker.com/linux/ubuntu/gpg + + $ cat DownloadedGpgFilePath | sudo apt-key add - + +5. Verify that you now have the key using last 8 characters of the fingerprint: + + $ sudo apt-key fingerprint 0EBFCD88 + + You should get sth like this: + + pub 4096R/0EBFCD88 2017-02-22 + Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 + uid Docker Release (CE deb) + sub 4096R/F273FCD8 2017-02-22 + + +6. Use the following command to set up the stable repository: + + $ sudo add-apt-repository \ + "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ + $(lsb_release -cs) \ + stable" + +7. Install Docker CE: + + $ sudo apt-get update + + If any errors occur, force using IPv4 by adding "-o Acquire::ForceIPv4=true update": + + $ sudo apt-get update -o Acquire::ForceIPv4=true update + + + Next step: + + $ sudo apt-get install docker-ce + + As before, if any errors occured, force using IPv4: + + $ sudo apt-get install docker-ce -o Acquire::ForceIPv4=true update + + +8. Verify that Docker CE is installed correctly by running the hello-world image: + + $ sudo docker run hello-world + + +9. If you don’t want to use sudo when you use the docker command, create a Unix group called docker and add users to it: + + Create the docker group: + + $ sudo groupadd docker + + + Add your user to the docker group. + + $ sudo usermod -aG docker $USER + + + Log out and log back in so that your group membership is re-evaluated. + If testing on a virtual machine, it may be necessary to restart the virtual machine for changes to take affect. + + +10. Install Docker Compose + + $ sudo apt install docker-compose + +11.Setup environment: + + From downloaded source code run: + + $ docker-compose up + + and point your browser to [http://localhost:8000](http://localhost:8000) and [http://localhost:4200](http://localhost:4200) + + +12. Enjoy! + + + + + + + + From d34d383efd03ab876d06ee0da7edfb8c167c6d5b Mon Sep 17 00:00:00 2001 From: jacekkalbarczyk Date: Fri, 17 Nov 2017 19:25:53 +0100 Subject: [PATCH 02/31] Deleted Docker Manual --- Docker installation manual | 113 ------------------------------------- 1 file changed, 113 deletions(-) delete mode 100644 Docker installation manual diff --git a/Docker installation manual b/Docker installation manual deleted file mode 100644 index 7af9d756..00000000 --- a/Docker installation manual +++ /dev/null @@ -1,113 +0,0 @@ -Docker and Docker Compose installation manual - -#Source website: -# https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/ - -0. Open terminal. - -1. Uninstall old versions of Docker: - - $ sudo apt-get remove docker docker-engine docker.io - -2. Update the apt package index: - - $ sudo apt-get update - -3.Install packages to allow apt to use a repository over HTTPS: - - $ sudo apt-get install \ - apt-transport-https \ - ca-certificates \ - curl \ - software-properties-common - -4. Add Docker’s official GPG key: - - $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - - Alternative way(in case of emergency): - - Open following URL in browser(Chrome, if possible): https://download.docker.com/linux/ubuntu/gpg - - $ cat DownloadedGpgFilePath | sudo apt-key add - - -5. Verify that you now have the key using last 8 characters of the fingerprint: - - $ sudo apt-key fingerprint 0EBFCD88 - - You should get sth like this: - - pub 4096R/0EBFCD88 2017-02-22 - Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 - uid Docker Release (CE deb) - sub 4096R/F273FCD8 2017-02-22 - - -6. Use the following command to set up the stable repository: - - $ sudo add-apt-repository \ - "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ - $(lsb_release -cs) \ - stable" - -7. Install Docker CE: - - $ sudo apt-get update - - If any errors occur, force using IPv4 by adding "-o Acquire::ForceIPv4=true update": - - $ sudo apt-get update -o Acquire::ForceIPv4=true update - - - Next step: - - $ sudo apt-get install docker-ce - - As before, if any errors occured, force using IPv4: - - $ sudo apt-get install docker-ce -o Acquire::ForceIPv4=true update - - -8. Verify that Docker CE is installed correctly by running the hello-world image: - - $ sudo docker run hello-world - - -9. If you don’t want to use sudo when you use the docker command, create a Unix group called docker and add users to it: - - Create the docker group: - - $ sudo groupadd docker - - - Add your user to the docker group. - - $ sudo usermod -aG docker $USER - - - Log out and log back in so that your group membership is re-evaluated. - If testing on a virtual machine, it may be necessary to restart the virtual machine for changes to take affect. - - -10. Install Docker Compose - - $ sudo apt install docker-compose - -11.Setup environment: - - From downloaded source code run: - - $ docker-compose up - - and point your browser to [http://localhost:8000](http://localhost:8000) and [http://localhost:4200](http://localhost:4200) - - -12. Enjoy! - - - - - - - - From c9eb05728f3182209c77dc69c089eedd1c22574e Mon Sep 17 00:00:00 2001 From: jacekkalbarczyk Date: Wed, 24 Jan 2018 20:03:44 +0100 Subject: [PATCH 03/31] CreatedRegisterComponent --- frontend/src/app/app.module.ts | 6 +++++ .../src/app/register/register.component.css | 0 .../src/app/register/register.component.html | 3 +++ .../app/register/register.component.spec.ts | 25 +++++++++++++++++++ .../src/app/register/register.component.ts | 15 +++++++++++ 5 files changed, 49 insertions(+) create mode 100644 frontend/src/app/register/register.component.css create mode 100644 frontend/src/app/register/register.component.html create mode 100644 frontend/src/app/register/register.component.spec.ts create mode 100644 frontend/src/app/register/register.component.ts diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 7f942c8d..bebedc23 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -30,6 +30,7 @@ import { BannerComponent } from './banner/banner.component'; import { FaqOrganizationsComponent } from './static/faq-organizations.component'; import { OfficeComponent } from './static/office/office.component'; import { FaqVolunteersComponent } from './static/faq-volunteers.component'; +import { RegisterComponent } from './register/register.component'; Raven.config(environment.sentryDSN).install(); @@ -68,6 +69,10 @@ const appRoutes: Routes = [ path: 'login', component: LoginComponent, }, + { + path: 'register', + component: RegisterComponent, + }, { path: 'regulations', component: RegulationsComponent @@ -102,6 +107,7 @@ const appRoutes: Routes = [ FaqOrganizationsComponent, OfficeComponent, FaqVolunteersComponent, + RegisterComponent, ], imports: [ BrowserModule, diff --git a/frontend/src/app/register/register.component.css b/frontend/src/app/register/register.component.css new file mode 100644 index 00000000..e69de29b diff --git a/frontend/src/app/register/register.component.html b/frontend/src/app/register/register.component.html new file mode 100644 index 00000000..68065ce1 --- /dev/null +++ b/frontend/src/app/register/register.component.html @@ -0,0 +1,3 @@ +

+ register works!ksjndk skjn +

diff --git a/frontend/src/app/register/register.component.spec.ts b/frontend/src/app/register/register.component.spec.ts new file mode 100644 index 00000000..6c19551b --- /dev/null +++ b/frontend/src/app/register/register.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RegisterComponent } from './register.component'; + +describe('RegisterComponent', () => { + let component: RegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RegisterComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/frontend/src/app/register/register.component.ts b/frontend/src/app/register/register.component.ts new file mode 100644 index 00000000..746778ce --- /dev/null +++ b/frontend/src/app/register/register.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'volontulo-register', + templateUrl: './register.component.html', + styleUrls: ['./register.component.css'] +}) +export class RegisterComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} From f67a3ef6c89f12b4e20e6a9802eec1aae8a1b51e Mon Sep 17 00:00:00 2001 From: jacekkalbarczyk Date: Wed, 21 Mar 2018 18:02:08 +0100 Subject: [PATCH 04/31] Moved Registration To Angular --- .../apps/volontulo/templates/auth/login.html | 2 +- .../volontulo/templates/common/footer.html | 8 +-- .../volontulo/templates/common/header.html | 2 +- .../templates/emails/registration.html | 2 +- .../templates/emails/registration.txt | 2 +- .../apps/volontulo/templates/homepage.html | 2 +- backend/apps/volontulo/urls.py | 11 +++- backend/apps/volontulo/views/api.py | 63 +++++++++++++++++++ .../account-activation.component.css | 0 .../account-activation.component.html | 4 ++ .../account-activation.component.spec.ts | 25 ++++++++ .../account-activation.component.ts | 39 ++++++++++++ frontend/src/app/app.module.ts | 6 ++ frontend/src/app/auth.models.ts | 10 +++ frontend/src/app/auth.service.ts | 24 +++++++ frontend/src/app/footer/footer.component.html | 6 +- frontend/src/app/header/header.component.html | 2 +- .../src/app/register/register.component.html | 52 ++++++++++++++- .../src/app/register/register.component.ts | 26 +++++++- 19 files changed, 268 insertions(+), 18 deletions(-) create mode 100644 frontend/src/app/account-activation/account-activation.component.css create mode 100644 frontend/src/app/account-activation/account-activation.component.html create mode 100644 frontend/src/app/account-activation/account-activation.component.spec.ts create mode 100644 frontend/src/app/account-activation/account-activation.component.ts diff --git a/backend/apps/volontulo/templates/auth/login.html b/backend/apps/volontulo/templates/auth/login.html index 09dc07cc..63793755 100644 --- a/backend/apps/volontulo/templates/auth/login.html +++ b/backend/apps/volontulo/templates/auth/login.html @@ -5,7 +5,7 @@ {% block content %}

Rejestracja w Volontulo

-
+ {% csrf_token %}
{{ user_form.email.errors }} diff --git a/backend/apps/volontulo/templates/common/footer.html b/backend/apps/volontulo/templates/common/footer.html index 2cc0f357..d3720fe8 100644 --- a/backend/apps/volontulo/templates/common/footer.html +++ b/backend/apps/volontulo/templates/common/footer.html @@ -5,8 +5,8 @@

Nawigacja

@@ -14,7 +14,7 @@