Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZendaInnocent committed Nov 5, 2023
1 parent 3e8fbee commit e858c93
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 48 deletions.
76 changes: 38 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,43 @@ An application to help organize personal data and information.

- [x] **User Registration and Authentication**

Register, login and logout securily.
Register, login and logout securily.

- [x] **Task and To-Do Lists**

Create and manage to-do lists and tasks with due dates and priority level.
Create and manage to-do lists and tasks with due dates and priority level.

- [ ] **Contact Management**
- [x] **Contact Management**

Store and manage contacts including names, addresses, phone numbers, email addresses, and additional notes.
Store and manage contacts including names, addresses, phone numbers, email addresses, and additional notes.

- [ ] **Notes and Memo**
- [x] **Notes and Memo**

Capture and organize notes, ideas, and memos in different categories or tags.
Capture and organize notes, ideas, and memos in different categories or tags.

- [ ] **Calendar and Event Management**

A calendar to schedule, visualize and manage events, appointments, tasks and reminders.
A calendar to schedule, visualize and manage events, appointments, tasks and reminders.

- [ ] **Search and Filters**

Efficient search functionality and filters to quickly find specific information.
Efficient search functionality and filters to quickly find specific information.

- [ ] **Customizable Categories and Tags**

Create your own custom categories and tags for organizing data.
Create your own custom categories and tags for organizing data.

- [ ] **Import and Export**

Capability to import existing data and export it in various formats.
Capability to import existing data and export it in various formats.

- [ ] **Reminders and Notifications**

Reminders and notifications sent for upcoming events and tasks.
Reminders and notifications sent for upcoming events and tasks.

- [ ] **File Storage**

Safely store and manage files and attachments related to contacts, events and tasks.
Safely store and manage files and attachments related to contacts, events and tasks.

## Getting Started

Expand All @@ -58,51 +58,51 @@ An application to help organize personal data and information.

2. Clone the forked repository

```bash
git clone https://github.com/<your-username>/personal-information-manager
```
```bash
git clone https://github.com/<your-username>/personal-information-manager
```

3. Create and activate virtual environment

```bash
py -m venv .venv
```bash
py -m venv .venv

source .venv/bin/activate
.venv/scripts/activate # windows
```
source .venv/bin/activate
.venv/scripts/activate # windows
```

4. Install Project Dependencies

```bash
pip install pipenv # this project use pipenv to manage packages
pipenv install --dev
```
```bash
pip install pipenv # this project use pipenv to manage packages
pipenv install --dev
```

Rename '.env_sample' to '.env', the fill the value accordingly.
Rename '.env_sample' to '.env', the fill the value accordingly.

Install the git hook script for pre-commit
Install the git hook script for pre-commit

```bash
pre-commit install
```
```bash
pre-commit install
```

5. Apply database migrations

```bash
py manage.py migrate
```
```bash
py manage.py migrate
```

6. Create superuser for admin access

```bash
py manage.py createsuperuser
```
```bash
py manage.py createsuperuser
```

7. Run the development server

```bash
py manage.py runserver
```
```bash
py manage.py runserver
```

8. Access your app in your browser at `http://localhost:8000`

Expand Down
1 change: 1 addition & 0 deletions pim/contacts/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ class ContactAdmin(admin.ModelAdmin):
'is_favorite',
'email',
'phone_number',
'user',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Generated by Django 4.2.7 on 2023-11-05 09:15

import phonenumber_field.modelfields
from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
('contacts', '0009_contact_organization'),
]

operations = [
migrations.AlterField(
model_name='contact',
name='avatar',
field=models.ImageField(
blank=True,
default='avatars/User Avatar.jpg',
null=True,
upload_to='avatars',
verbose_name='avatar',
),
),
migrations.AlterField(
model_name='contact',
name='email',
field=models.EmailField(
blank=True, max_length=254, null=True, verbose_name='email'
),
),
migrations.AlterField(
model_name='contact',
name='is_favorite',
field=models.BooleanField(default=False, verbose_name='is favorite'),
),
migrations.AlterField(
model_name='contact',
name='name',
field=models.CharField(max_length=100, verbose_name='name'),
),
migrations.AlterField(
model_name='contact',
name='organization',
field=models.CharField(
blank=True, max_length=100, null=True, verbose_name='organization'
),
),
migrations.AlterField(
model_name='contact',
name='phone_number',
field=phonenumber_field.modelfields.PhoneNumberField(
max_length=128, region=None, verbose_name='phone number'
),
),
migrations.AlterField(
model_name='contact',
name='title',
field=models.CharField(
blank=True, max_length=100, null=True, verbose_name='title'
),
),
]
4 changes: 2 additions & 2 deletions pim/contacts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class Contact(models.Model):
title = models.CharField(_('title'), max_length=100, blank=True, null=True)
avatar = models.ImageField(
_('avatar'),
upload_to='media/avatars',
upload_to='avatars',
blank=True,
null=True,
default='static/images/User Avatar.jpg',
default='avatars/User Avatar.jpg',
)
is_favorite = models.BooleanField(_('is favorite'), default=False)
email = models.EmailField(_('email'), blank=True, null=True)
Expand Down
4 changes: 3 additions & 1 deletion pim/contacts/templates/contacts/contact_detail.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% load static %}

<div class="row mt-4 mt-md-0">
<div class="col-4 text-end">
<img src="/static/images/User Avatar.jpg" alt="User Avatar" class="w-100 rounded-3">
<img src="{{ contact.avatar.url }}" alt="User Avatar" class="w-100 rounded-3">
</div>
<div class="col-8">
<h2>
Expand Down
2 changes: 1 addition & 1 deletion pim/contacts/templates/contacts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h3>{% trans 'Contacts' %}</h3>
<div class="d-flex align-items-center justify-content-between">
<input class="form-control me-2" type="search" placeholder="{% trans 'Search' %}" aria-label="Search" name="q"
hx-get="{% url 'contacts:contact-search' %}" hx-trigger="keyup changed delay:500ms, search"
hx-target="#contacts">
hx-target="#contacts" hx-indicator=".htmx-indicator">
<button class="btn btn-outline-primary" hx-get="{% url 'contacts:contact-add' %}" hx-target="#detail">
{% trans 'Add' %}
</button>
Expand Down
6 changes: 0 additions & 6 deletions templates/account/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,5 @@ <h1>Log In</h1>
<button type="submit" class="btn btn-primary">
Login
</button>

<span class="ms-4">
<a href="{% url 'account_reset_password' %}">
Forgot password?
</a>
</span>
</form>
{% endblock content %}

0 comments on commit e858c93

Please sign in to comment.