GithubHelp home page GithubHelp logo

david2261 / investor Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 63.44 MB

News, blog and investor/trader community. With us you will be able to start your way in investing and increasing your capital.

License: GNU General Public License v3.0

Python 26.64% HTML 16.81% Procfile 0.01% CSS 8.79% JavaScript 4.58% Dockerfile 0.39% TypeScript 42.75% Shell 0.03%
python investing docker nginx react django axios drf

investor's Introduction

Edit in Eraser

InvestorSite

Tools

  • 📋 Languages:

  • 📚 Frameworks, Platforms and Libraries:

  • 💾 Data Base:

  • 💻 IDEs/Editors:

Description

I have written a website where an investor and a trader can: read the latest news related to finance, share their impressions about the state of the market and see the comments of other market participants

Topics

- Investing
- Trading
- News
- Comments

Getting Started

  • Virtual environment
    • pip install virtualenv
  • Activate
    • venv\Scripts\activate
  • Install tools
    • pip install -r requirements
  • Run django server
    1. python manage.py makemigrations
    2. python manage.py migrate
    3. python manage.py runserver
  • Run Node server
cd hello/apps/frontend
npm run dev

Example

# Блок для создания статей
class Article(models.Model):
    Idea = 'ID'
    Learn = 'LN'
    Motivation = 'mt'
    Blog = 'bl'

    # Переменная по созданию определенных категорий, т.е.
    # на каждой странице своя тема.
    CATEGORY = [
        (Idea, 'Idea'),
        (Learn, 'Learn'),
        (Motivation, 'Motivation'),
        (Blog, 'Blog'),
    ]

    title = models.CharField('Название статьи', max_length = 120)
    text = HTMLField('Текст статьи')
    genre = models.ManyToManyField(
        Genre,
        help_text="Select a genre for this article"
    )
    category = models.CharField(
        max_length=2,
        choices=CATEGORY,
        default=Blog,
    )
    views = models.IntegerField('Просмотры', default=0)
    image = models.ImageField(
        null = True,
        blank=True,
        upload_to='Article',
        help_text='150x150px',
        verbose_name='Изображение'
    )
    pub_date = models.DateTimeField('Дата публикации', auto_now_add = True)
    content = HTMLField(null=True)

    def display_genre(self):
        return ', '.join([ genre.name for genre in self.genre.all()[:3] ])
        display_genre.short_description = 'Genre'

    def __str__(self):
        return self.title

    def was_published_recently(self):
        return self.pub_date >= (
            timezone.now() - datetime.timedelta(days = 7)
        )
        
    class Meta:
                verbose_name = 'Статья'
                verbose_name_plural = 'Статьи'
                ordering = ["-id", "-pub_date"]```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.