Giter Site home page Giter Site logo

piplmesh's People

Contributors

agiz avatar aljana avatar andrejcesen avatar cardawid avatar dcrystalj avatar domenc avatar frendo11 avatar gitek1 avatar igypigi avatar ireallyneedanick avatar irrialite avatar jakacikac avatar jurebajt avatar kubili avatar lazarm avatar martinjakomin avatar matevzmihalic avatar mfrlin avatar mihano avatar mitar avatar mitjap avatar nejczupec avatar premik91 avatar scorpioalen1 avatar zupan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

piplmesh's Issues

Design list of online users

Current design list of online users could be improved. For example, small (20x20) user images should be displayed next to the usernames, each entry in the list could be of a fixed width and length, with some scrollbar on the right. Whole list should be sorted, or even sortable. Maybe even searchable/filterable (on top a input box when you enter something that only those entries are displayed). Also some additional information could be displayed bellow the username (second text line, both lines are one user entry), like link to the profile page of this user.

Probably correct way to do this is to keep the list of online uses as a list of user objects in JavaScript, keep it current with updates, and simply just render this list on updates into a placeholder.

Blocked by: #63

REST interface for posts and comments

Define REST interface for posts, comments, and attachments. We will probably use Tastypie and its MongoEngine extension django-tastypie-mongoengine, but you can also research other libraries. Tastypie takes care of defining the API, like query and format interface, but we still have to define URL structure. Let it be like:

/api/post/
/api/post/id/
/api/post/id/comment/
/api/post/id/comment/id/
/api/post/id/attachment/
/api/post/id/attachment/id/

IDs in MongoDB are not numerical/sequential values. You will have to play a bit with nested resources.

For now, for API authentication, use Django authentication (so authentication of the Django request). Or even more: simply allow everything.

Configure gitignore file

In the repository there should be .gitignore file configured so that unwanted files are not tracker or committed by git (by accident). For example, *.pyc files, .* files, and env_piplmesh are very good candidates for files/directories we will probably not want to have in our repository.

Initially display list of online users

Currently, only updates to the list of online users are done. But initially this list is empty. This is not correct, it should be populated with currently online users.

Initial Django installation with static welcome page

Initial Django installation with static welcome page. On the top there should be logo on the left and on the right Google search box for users to be able to easily start their searches on Google (they are redirected to Google, we are not doing a custom Google search).

Put Django site in the piplmesh subdirectory of the repository, and then structure features as Django apps inside (Python submodules). This static page could be in the frontend app (so the whole name of the app is piplmesh.frontend). For example, we might get a structure something like:

<repository root>/
  docs/
    ...
  piplmesh/
    account/
      __init__.py
      models.py
      ...
    api/
      __init__.py
      models.py
      ...
    formats/
      en/
        ...
      __init__.py
    frontend/
      static/
        piplmesh/
          css/
            ...
          js/
            ...
          ...
      templates/
        base.html
        header.html
        footer.html
        home.html
        ...
      tests/
        __init__.py
        ...
      __init__.py
      models.py
      views.py
    __init__.py
    manage.py
    settings.py
    urls.py
  COPYING
  LICENSE
  README
  requirements.txt

Split templates according to Django best practices (Google that) using template inheritance and define common template blocks.

Define Tastypie document type for MongoEngine

Define Tastypie document type for MongoEngine.

We will be using Tastypie for REST interface (but if you find some better library, tell). It does not yet have support for MongoEngine but it is possible to define your own data sources. It should be defined similar to official ModelResource for Django ORM (Django models). For example, it should automatically be able to view schema of the MongoEngine document. Probably you will have to define also new/custom data fields.

Maybe there exist something already on the web. Search. ;-) If not, develop this as an independent project, creating pull request against this repository.

After logout, redirect user back

After user logouts, she should be redirected back to the page she came from. Display to the user a message that logout was successful.

Implement django-lazyuser for MongoDB

Implement something like django-lazyuser for MongoDB. So that also temporary users would be in MongoDB. Because we are implementing now everything ourselves, we can use only one user model/object with all needed fields.

I would just change decorator django-lazyuser users into additional middleware which would in practice be very similar, but would automatically be applied to all requests (which is I believe what we want).

XHTML validity

We have some things which are invalid in XHTML. That should be fixed.

Migrate user object to MongoDB

After some thought I have decided we will use only MongoDB. To learn how to do everything only with non-relational database. And because we have different authentication backends with different data provided. So we will drop relation database support completely (so we will not use default Django permissions and authentication backends, we will also have to migrate session storage to MongoDB, we will not use site framework anymore). Admin Django app will also not be used anymore.

For MongoDB we will use MongoEngine. There is some documentation how to use it together with Django.

Data we want for the user:

  • username/nickname
  • e-mail address
  • name, surname
  • avatar
  • language preference
  • country
  • gender
  • age/birthday

Add licensing information

Open source project needs licensing information so that other users and developers know under which terms they can use and distribute our project. As we are developing a web portal I propose to use AGPL license so that any additions to source code have to be shared even if the program is only run on the server and not distributed. For media content I propose Creative Commons Attribution-ShareAlike license.

You can help yourself with the COPYING and LICENSE files of the nodewatcher project.

Add language choice to user

User should be able to configure her language. This should then be used around the portal for translation, etc., when user is logged in.

List of currently logged in users

On home page provide a list of currently logged in users. Maintain the list up-to-date also after the page has been opened. Do this using HTTP push for real-time updates.

For now use onbeforeunload JavaScript event handler to signal the server that user is closing the page (but be careful if the page is opened multiple times).

Use django-pushserver app for HTTP push support.

Add unit tests

More our application grows harder it is to know if everything is still working after you change something. For automatic checking if things work, we can use unit tests. Django provides good support for testing and you can simulate web requests and more.

There is never too few tests, so write them. Test every aspect of our application, user registration, login, logout, APIs, ... First tests will be much easier than later (which will involve also JavaScript) so hurry to get the easy ones.

Test both from the client (web request) side and also internal APIs (like calling defined classes/methods/functions).

After login, redirect user back

After user wants to login, and goes to the login page, after login, she should be redirected back to the page she came from. Display to the user a message that login was successful.

Use Facebook button

Use Facebook button (that blue thing) and not text, so that it is more recognizable.

Display Google search results inside the portal

Display Google search results inside the portal and not redirect to the Google itself. In this way we can retain users on our portal and later on also integrate our own results from the portal.

Ads provided by Google for user searches should be displayed so that we can monetize that we have a Google search form integrated.

Support OpenID for registering our users

Support OpenID for registering/login of our users. We could try to retrieve also some additional meta/profile data provided by some OpenID providers (like name, surname, e-mail address, ...).

Improve search

Past search query string should be visible on result page. "See your results" should be visible only on results page. That X on the right is unnecessary. Design the whole search input box as Firefox home search box. We should also have ads on the right side of the results?

Structure CSS file

We had a very nice CSS file structure, indented in accordance with DOM structure. Currently CSS file is not anymore likes this. It should be made again.

Search query string should be simplified

Search query string should be simplified, currently some parameters are passed around which are not necessary as they are constant. Only user parameters should be in query (like search keywords).

Change facebook avatar to gravatar

Current situation:
When you register (normal, not Facebook) in PiplMesh and then login in -> get picture from Facebook based on username not an e-mail. So when I register it with username "mitar" then I get a picture user "mitar" and don't get picture based on my email.

Fix it that based on user email with use a gravatar services

Add Python requirements

It is common to include requirements.txt file which lists all Python requirements of the project so that they can be installed with pip install -r requirements.txt. File can be created with pip freeze (inside virtualenv, of course).

LimitedDateTimeField should support callables as limit arguments

We have defined custom LimitedDateTimeField MongoEngine field type. It takes upper_limit and lower_limit arguments. But currently arguments can be only values defined at a definition time and not callables which would allow that limits are evaluated every time the field is validated. Similar to how default is defined in Django.

We need this because limits could change between definition time (Django app is imported) and use time (field is validated).

Support Facebook Connect for registering our users

Support Facebook Connect for registering/login of our users. We could retrieve some additional information about our users. We could also be a bit viral and try to get information about all user's friends so that we can automatically match our users together and connect them also on our portal so that they do not need to find their friends manually again.

Display correct user avatar

Currently we show users avatar from Facebook even if user didn't login with Facebook.

Change user avatar, to use gravatar if user isn't loged in with Facebook.

Bug in facebook backend

When I get latest code from GitHub and run it, I get next error:

Error importing authentication backend account.backends.FacebookBackend: "No module named account.backends"

In template d:\IPIRI\PiplMesh\piplmesh\frontend\templates\header.html, error at line 29
Error importing authentication backend account.backends.FacebookBackend: "No module named account.backends"

" {% if user.is_authenticated %}"

Create/update template tag for user avatar

Create/update template tag for user avatar so that it first tries to get avatar from the user object (like from Facebook or OpenID) and if this fails it tries Gravatar (template tag for the later has already been written, so it should be reused/extended).

User authentication and registration

When users visit our portal we want to give them opportunity to register and authenticate. Smart idea is to create username automatically and allow them to use some features of the portal (like customization) immediately, and invite them to register to have their preferences and content persistent (and accessible across sessions). One such way is to use django-lazysignup, but you should also research possible other ways to achieve this.

Usernames should be case-insensitive

In Django, usernames (for model-based authentication) are by default case-sensitive. This is really crazy and it would be great to make them insensitive, but case-preserving. (Passwords should still be sensitive, of course.)

Give user an option to select between Facebook and Gravatar picture

When linking will be possible (#76), we should add to option for users to select which user picture they want displayed: Gravatar or Facebook. If user first registered through Facebook, the default should be Facebook, if user first registered directly, then after linking default should change to Facebook if user does not have a Gravatar picture. (Is there a way to test this?)

Blocked by: #76

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.