Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/artur24814/calendar_manager

📅 Social media web site for managing business meetings or friends meeting
https://github.com/artur24814/calendar_manager

calendar chatroom django railway redis-server social-network websocket

Last synced: 10 days ago
JSON representation

📅 Social media web site for managing business meetings or friends meeting

Awesome Lists containing this project

README

        

# calendar_manager

Contents




INFO

Information about the additional library, external Api used in this project and general information

Django
A high-level Python web framework that encourages rapid development and clean, pragmatic design..

Bootstrap Powerful, extensible, and feature-packed frontend toolkit.

django-widget-tweaks Tweak the form field rendering in templates, not in python-level form definitions. Altering CSS classes and HTML attributes is supported.

pytest-django pytest-django allows you to test your Django project/applications with the pytest testing tool.

django-storages/boto3 django-storages is a collection of custom storage backends for Django.Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python, which allows Python developers to write software that makes use of services like Amazon S3 and Amazon EC2.

django-sslserver2 Django package to support both HTTP and HTTPS as runserver command. (For testing social Autch )

social-auth-app-django This is the Django component of the python-social-auth ecosystem, it implements the needed functionality to integrate social-auth-core in a Django based project.

HTMX htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext

channels Channels is a project that takes Django and extends its abilities beyond HTTP - to handle WebSockets, chat protocols, IoT protocols, and more. It’s built on a Python specification called ASGI.


Calendar Manager

## The website contains several applications:
* accounts
* calendar
* Chat app

### Accounts

You must be register to have full access to all features. When creating a new profile, you need to select when you will be available for meetings from one hour to an hour, as well as the meeting format (it can be 15/30/45/60 minutes or one day) and the days of the week. All this information will be needed to count available seats and avoid booking when you are not available or physically unable to do so.

| Sign in | Sign on |
| ---- | ----- |

```
In app accounts I use HTMX to dynamically connect my views with backend.
This is another way of communication between frontend and backend.
```

Without registering, you can view users, view the list of their appointments (if they have selected the scoupe calendar for "all"), but that's all you can do.

Register

You can go back to your profile settings and change anything at any time.

### Calendar

After creating a new account, you now see your Calendar, nothing happens in it, but when you have an appointment, that appointment will appear in your calendar.

How your profile will be visible to others will depend on the settings in your profile. Full information may be available to all users, only friends or only you. Also when you select the "Organization" role in the settings, your profile and calendar will have a different view, but we'll talk about that later.

Calendar

Let's check someone's calendar.

When you visit someone else's calendar view, you can ask them for an appointment. However, you should check the time and day and availability, because if you choose the wrong time, you can send him this form, and of course, you can't ask him to meet you in the past.

Meeting

As you can see, there is a difference between what the calendar looks like for its owner and what it looks like for a guest (if you are the owner you have more information about appointments) ⬇️.

Meeting2

If everything is correct, this user will see our request in his panel and only if he accepts it, the meeting will be in our calendar and in his. The number of vacancies in both our calendars will be recalculated.

meeting ok

If he ignores it, the meeting will go down in history, but it won't affect anything.

You can follow users and users can follow you. In the search input, enter a username, last name or nickname and find him.

Chat Rooms

The "Chat" application creates a WebSocket connection between users in their room.

*I use Django channels for this.

I call it rooms, but in my app it's called "discussions". If the user is online (it means they have an open dialog) this discussion will have a green point.

In the dialog view, all users will have the same view at the same time (you don't need to reload the page to see new messages)

If you want, you can rename the room and add more users to the discussion.

For businesses



This site, as I mentioned earlier, looks different for companies.

| There is no calendar on the profile page where you can make appointments, instead, on the company profile page, you can see the employees of the company, as well as articles or events of that company. ➡️ | |
| :--- | :---: |



By entering as the owner of this page, you will be able to manage it ➡️:


  • add employees, edit their positions and responsibilities;

  • add posts.






Add post ⬇️ | Edit employee ⬇️
-- | --
|

The post will have its shortcut on the profile page and it will also have a details view.

| | |
| ------- | ------ |

An additional and very useful option for companies is the creation of chat groups.

You will see new button on your user panel.

Each time you click on it, you will renew the chat, and if you add new employees, they will automatically appear there.

Clone and Run a Django Project

Before diving let’s look at the things we are required to install in our system.

To run Django prefer to use the Virtual Environment

`pip install virtualenv`

Making and Activating the Virtual Environment:-

`python -m venv “name as you like”`

`source env/bin/activate`

Installing Django:-

`pip install django`

Now, we need to clone project from Github:-

Above the list of files, click Code.


Copy the URL for the repository.


  • To clone the repository using HTTPS, under "HTTPS", click

  • To clone the repository using an SSH key, including a certificate issued by your organization's SSH certificate authority, click SSH, then click

  • To clone a repository using GitHub CLI, click GitHub CLI, then click


Open Terminal.

Change the current working directory to the location where you want the cloned directory.

Type git clone, and then paste the URL you copied earlier.

`$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY`

Press Enter to create your local clone.

```
$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
> Cloning into `Spoon-Knife`...

> remote: Counting objects: 10, done.
> remote: Compressing objects: 100% (8/8), done.
> remove: Total 10 (delta 1), reused 10 (delta 1)
> Unpacking objects: 100% (10/10), done.
```

Install the project dependencies:

`pip install -r requirements.txt`

create .env file,
put this information in file.

```python
DEBUG=True
SECRET_KEY='your_secret'

POSTGRES_DB='postgres'
POSTGRES_USER='postgres'
POSTGRES_PASSWORD='postgres'

AWS_ACCESS_KEY_ID='your_id'
AWS_SECRET_ACCESS_KEY='your_key'
AWS_STORAGE_BUCKET_NAME='your_bucket_name'

AWS_S3_FILE_OVERWRITE=False

SOCIAL_AUTH_FACEBOOK_KEY="your_facebook_appid"
SOCIAL_AUTH_FACEBOOK_SECRET="your_facebook_secretkey"
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY="your_google_key"
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET="Your_google_secret"

EMAIL_HOST_USER='email'
EMAIL_HOST_PASSWORD='app-pasword'
```

!!!! If you want to use all the features of this site, you should first create a bucket in amazon C3, create development pages in google, facebook and set up your mail account !!!

create admin account (**remember you must be at the main application folder with file manage.py, and do this steps for
each application in this repository!!!!**)

`python manage.py createsuperuser`

then

`python manage.py makemigrations`

then run

`python manage.py migrate`

to start the development server

`python manage.py runserver`

and open localhost:8000 on your browser to view the app.

run tests

```
> cd tests
> pytest
```

Have fun

🦁