Coder Social home page Coder Social logo

python-gsoc / python-blogs Goto Github PK

View Code? Open in Web Editor NEW
41.0 9.0 60.0 3.63 MB

Python Software Foundation GSoC Blog Platform

Home Page: http://python-gsoc.org/

License: GNU Affero General Public License v3.0

Shell 0.04% Python 26.13% HTML 12.87% CSS 4.79% JavaScript 56.18%
gsoc python psf hacktoberfest

python-blogs's Introduction

Python-GSoC Blogging platform

Blog and management platform for PSF for running GSoC

Build Status

Build Status

Installation

  • Tested with python 3.7.3

To install development dependncies:

$ pip install -r requirements.txt

To setup settings copy settings_local.py.template to the root of the dir

cp settings_local.py.template settings_local.py

Setup database

  • Download and install XAMPP or any other MySQL server
  • Open Xampp/MySql Shell
  • Login to MySql (default user:'root', default pass:'')
mysql -u root 
  • Create a database
CREATE DATABASE python_blogs;
  • Update username and password in the settings_local.py
  • Run migrate command
python manage.py migrate
  • Run command to load data
python manage.py loaddata data.json

Usage

python manage.py runserver 0.0.0.0:8000

You can then access the site with the login bar with http://127.0.0.1:8000/en/?edit

Default user/pass is admin for the superuser

Default student users are student-1, student-2, student-3 and student-4 with pass ^vM7d5*wK2R77V

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Google OAuth

  • Go to https://console.cloud.google.com/ and create a new project
  • Enable Google Calendar API and create an OAuth 2.0 client ID
  • add following on the Authorised redirect URIs of OAuth client ID
http://localhost/
  • Download the JSON file and rename it to credentials.json
  • Move the file to the root folder of the project

Virtualenv

A virtual environment is a tool that helps to keep dependencies required by different projects separate by creating isolated python virtual environments for them. This means that each project can have its own dependencies, regardless of what dependencies every other project has. We use a module named virtualenv which is a tool to create isolated Python environments. virtualenv creates a folder which contains all the necessary executables to use the packages that a Python project would need.

Installing virtualenv

$ pip install virtualenv

Test your installation

$ virtualenv --version

Using virtualenv

You can create a virtualenv using the following command:

$ virtualenv virtualenv_name

After running this command, a directory named my_name will be created. This is the directory which contains all the necessary executables to use the packages that a Python project would need. This is where Python packages will be installed.

Now after creating virtual environment, you need to activate it. Remember to activate the relevant virtual environment every time you work on the project. This can be done using the following command:

$ source virtualenv_name/bin/activate

Once the virtual environment is activated, the name of your virtual environment will appear on left side of terminal. This will let you know that the virtual environment is currently active. Now you can install dependencies related to the project in this virtual environment. For example if you are using Django 1.9 for a project, you can install it like you install other packages.

(virtualenv_name) $ pip install Django==1.9

Once you are done with the work, you can deactivate the virtual environment by the following command:

(virtualenv_name) $ deactivate

Now you will be back to system’s default Python installation.

python-blogs's People

Contributors

arcriley avatar arinze1020 avatar botanicvelious avatar chandan00761 avatar diwash007 avatar dotgourav avatar jeffysam6 avatar juliocesark avatar karna98 avatar mastersabh avatar mihir-karbelkar avatar saurabh-singh-00 avatar sg0304986 avatar sharmaadityahq avatar shashank-sharma avatar sounak98 avatar terriko avatar warthog9 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

python-blogs's Issues

Add logging support

Logging is important for numerous reasons and we will need it as the project grows big.

GSoC 2019 - Create calendar page element

This task is to make a template tag item that will display the calendar in the local time of the user. There are 2 examples below, you would need to support the entire list of timezones.

GMT -7 MST example

<iframe src="https://calendar.google.com/calendar/embed?showTitle=0&amp;showPrint=0&amp;showCalendars=0&amp;height=600&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=uhambjin8qdb9af4vt03c4djg4%40group.calendar.google.com&amp;color=%23853104&amp;ctz=America%2FDenver" style="border-width:0" width="800" height="600" frameborder="0" scrolling="no"></iframe>

GMT -8 PST example

<iframe src="https://calendar.google.com/calendar/embed?showTitle=0&amp;showPrint=0&amp;showCalendars=0&amp;height=600&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=uhambjin8qdb9af4vt03c4djg4%40group.calendar.google.com&amp;color=%23853104&amp;ctz=America%2FLos_Angeles" style="border-width:0" width="800" height="600" frameborder="0" scrolling="no"></iframe>

Basically just need to change the value of "ctz="

to get and set the timezone see https://docs.djangoproject.com/en/2.1/topics/i18n/timezones/

GSoC 2019 - Scheduled tasks status page

This issue is to create a page on the admin panel that lets you see the status of all scheduled items.

The page would display all of these fields in a table, as well as need to have basic sorting and filtering options.

    command = models.CharField(name='command', max_length=20, choices=commands)
    data = models.TextField(name='data')
    success = models.BooleanField(name='success', null=True)
    last_error = models.TextField(name='last_error', null=True, default=None)
    created = models.DateTimeField(auto_now_add=True)

GSoC 2019 - Create form for suborg submissions

This task is to create a form that when submitted will enter the input data into the database.

The form fields are as follows:

Your details:

Why does your org want to participate in Google Summer of Code?

How many potential mentors have agreed to mentor this year?

Suborg Admin Email

Mentors Emails

How will you keep mentors engaged with their students?

How will you help your students stay on schedule to complete their projects?

How will you get your students involved in your community during GSoC?

How will you keep students involved with your community after GSoC?

Has your org been accepted as a mentor org in Google Summer of Code before?

Which years did your org participate in GSoC?

Was this as a Suborg?

For each year your organization has participated, provide the counts of successful and total students. (e.g. 2016: 3/4)

If your org has applied for GSoC before but not been accepted, select the years:

What year was your project started?

Where does your source code live?

Please provide URLs that point to repositories, GitHub organizations, or a web page that describes how to get your source code.

Anything else we should know (optional)?

Public Profile

Name

Website URL

A very short description of your organization.

Your organization logo. Must be a 24-bit PNG, minimum height 256 pixels.

Primary Open Source License

Ideas List

You must complete at least one of the following three contact options:

Chat
Link to a web page that describes how to get on your IRC channel or other realtime communication system.

Mailing List
Link to a page describing how to join your organization's mailing list.

Links

Twitter URL (optional)

Blog URL (optional)

GSoC 2019 - Create scheduler build_items page

This issue is to create a page and system that allows you to select tasks to be scheduled at specific times and on specific triggers.

For date scheduling you would select a date and time, then you would select the task, the tasks would need to come from the scheduler.command model field choices as a selectbox. When build_items is run it would check this data and see if it needs to add something to the schedule model data table.

For trigger schedule, you would need to write the base code to be able to specify some logic, for example.

foreach user where group == student if last_blog_post > 7 days then send_email for user

That is the only trigger scheduler you need to add for now but it needs to be simple to add more. These triggers may best be done in python code and not as part of the webpage.

This system would need to be tied into the build_items part of the scheduler system, so when build_items is run it auto adds to the scheduler model data table the items as appropriate.

GSoC 2019 - Add menu item for adding mentors

issue #33 is related

We need to have an admin menu item for adding mentors to the platform.

The admin toolbar item would need to have the following

1. Form for adding mentors with the following fields, email, name and all fields required to be filled in
2. A "+" for adding more than one mentor at a time in a form list.
3. After submitting the form it would add a user with those settings for each item in the form list

UnboundLocalError at schedule page

Describe the bug
The error is occurring on visiting the Schedule page.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Schedule page.'

Screenshots
image

Desktop (please complete the following information):

  • OS: Fedora 27
  • Browser: Mozilla Firefox Developer Edition 66.0b12

Additional information
Timezone: UTC+4

GSoC 2019 - Add field for uploading accepted proposal to student account

This issue is for creating an upload button that would add an accepted student proposal to the student's user account. The button would have to take a pdf file as an upload, as well as would have to prompt the uploader to be sure that they removed all private data before uploading. Bonus points if you actually scan the pdf text looking for items such as emails, phone numbers, etc and prompt the user to be 100% sure if you find anything.

GSoC 2019 - Add "is mentor" and "is suborg admin"

This is to add a boolean field is_mentor and is_suborg_admin that ties a use to a specific suborg. For example the user is tied to PSF 2019 and is set to is_mentor, however, that same user may be tied to PSF 2018 and is_suborg_admin.

GSoC 2019 - Auto create google calendar

This issue is to create an admin page that will talk to the google calendar api and auto add scheduled items to it. Would add an item by selecting a start and end date and time in UTC.

The admin page would also have a link to the public shared calander and the ical file from it.

GSoC 2019 - Routing issues

When running runserver it complains...

Performing system checks...

System check identified some issues:

WARNINGS:
?: (urls.W001) Your URL pattern '^blog/$' [name='article-list'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.
?: (urls.W001) Your URL pattern '^blog/(?P<slug>\w[-\w]*)/$' [name='article-detail'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.
?: (urls.W001) Your URL pattern '^blog/(?P<year>\d{4})/$' [name='article-list-by-year'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.
?: (urls.W001) Your URL pattern '^blog/(?P<year>\d{4})/(?P<month>\d{1,2})/$' [name='article-list-by-month'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.
?: (urls.W001) Your URL pattern '^blog/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$' [name='article-list-by-day'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.
?: (urls.W001) Your URL pattern '^blog/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<pk>\d+)/$' [name='article-detail'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.
?: (urls.W001) Your URL pattern '^blog/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>\w[-\w]*)/$' [name='article-detail'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.
?: (urls.W001) Your URL pattern '^blog/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<slug>\w[-\w]*)/$' [name='article-detail'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.
?: (urls.W001) Your URL pattern '^blog/(?P<year>\d{4})/(?P<slug>\w[-\w]*)/$' [name='article-detail'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.
?: (urls.W001) Your URL pattern '^blog/author/(?P<author>\w[-\w]*)/$' [name='article-list-by-author'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.
?: (urls.W001) Your URL pattern '^blog/category/(?P<category>\w[-\w]*)/$' [name='article-list-by-category'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.
?: (urls.W001) Your URL pattern '^blog/category/(?P<category>\w[-\w]*)/feed/$' [name='article-list-by-category-feed'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.
?: (urls.W001) Your URL pattern '^blog/feed/$' [name='article-list-feed'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.
?: (urls.W001) Your URL pattern '^blog/search/$' [name='article-search'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.
?: (urls.W001) Your URL pattern '^blog/tag/(?P<tag>\w[-\w]*)/$' [name='article-list-by-tag'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.
?: (urls.W001) Your URL pattern '^blog/tag/(?P<tag>\w[-\w]*)/feed/$' [name='article-list-by-tag-feed'] uses include with a route ending with a '$'. Remove the dollar from the route to avoid problems including URLs.

System check identified 16 issues (0 silenced).
February 14, 2019 - 23:58:19
Django version 2.1.7, using settings 'gsoc.settings'

Admin login gives 403 Forbidden Status

Trying to login as an admin or to edit pages gives 403 Forbidden Status. The error message is attached alongside.

Forbidden (403)
CSRF verification failed. Request aborted.

You are seeing this message because this site requires a CSRF cookie when submitting forms. This cookie is required for security reasons, to ensure that your browser is not being hijacked by third parties.

If you have configured your browser to disable cookies, please re-enable them, at least for this site, or for 'same-origin' requests.

Adding user throws error

if you add a user you get the error

no such table: cms_pageuser

Request Method: POST
http://127.0.0.1:8000/en/admin/auth/user/add/
1.11.20
OperationalError
no such table: cms_pageuser
C:\Python36\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 328
C:\Python36\python.exe
3.6.8
['D:\development\python-blog\python-blogs', 'C:\Python36\python36.zip', 'C:\Python36\DLLs', 'C:\Python36\lib', 'C:\Python36', 'C:\Python36\lib\site-packages']
Wed, 13 Feb 2019 14:29:14 -0800

GSoC 2019 - Hide admin only fields

This task is to not allow non super user users when adding a blog post article to not be able to change the following.

  • Author
  • Date
  • Time
  • Is featured
  • Meta Options
  • Advanced Options
  • Also pre-select is published

GSoC 2019 - Auto disable users

This issue is to add a feature so that you can set a date that the user will automatically have there account "active" status disabled. The date would be set in the user Home › Authentication and Authorization › Users › Test-Student1 and the check could be done as part of the run_cron command.

GSoC 2019 - new person error

Adding a new person throws an error


Request Method: | POST
-- | --
http://127.0.0.1:8000/en/cms_wizard/create/
2.1.7
TypeError
render() got an unexpected keyword argument 'renderer'
C:\Python36\lib\site-packages\django\forms\boundfield.py in as_widget, line 93
C:\Python36\python.exe
3.6.8
['D:\\development\\python-blog\\python-blogs',  'C:\\Python36\\python36.zip',  'C:\\Python36\\DLLs',  'C:\\Python36\\lib',  'C:\\Python36',  'C:\\Python36\\lib\\site-packages']
Thu, 14 Feb 2019 22:50:30 -0800

[14/Feb/2019 23:49:37] "GET /en/cms_wizard/create/?page=21&language=en&edit&cms_path=/en/test/test123/ HTTP/1.1" 200 13648
Internal Server Error: /en/cms_wizard/create/
Traceback (most recent call last):
  File "C:\Python36\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
    response = get_response(request)
  File "C:\Python36\lib\site-packages\django\core\handlers\base.py", line 156, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "C:\Python36\lib\site-packages\django\core\handlers\base.py", line 154, in _get_response
    response = response.render()
  File "C:\Python36\lib\site-packages\django\template\response.py", line 106, in render
    self.content = self.rendered_content
  File "C:\Python36\lib\site-packages\django\template\response.py", line 83, in rendered_content
    content = template.render(context, self._request)
  File "C:\Python36\lib\site-packages\django\template\backends\django.py", line 61, in render
    return self.template.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 171, in render
    return self._render(context)
  File "C:\Python36\lib\site-packages\django\test\utils.py", line 96, in instrumented_test_render
    return self.nodelist.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 937, in render
    bit = node.render_annotated(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "C:\Python36\lib\site-packages\django\test\utils.py", line 96, in instrumented_test_render
    return self.nodelist.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 937, in render
    bit = node.render_annotated(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "C:\Python36\lib\site-packages\django\test\utils.py", line 96, in instrumented_test_render
    return self.nodelist.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 937, in render
    bit = node.render_annotated(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "C:\Python36\lib\site-packages\django\test\utils.py", line 96, in instrumented_test_render
    return self.nodelist.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 937, in render
    bit = node.render_annotated(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 937, in render
    bit = node.render_annotated(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 937, in render
    bit = node.render_annotated(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\loader_tags.py", line 188, in render
    return template.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 173, in render
    return self._render(context)
  File "C:\Python36\lib\site-packages\django\test\utils.py", line 96, in instrumented_test_render
    return self.nodelist.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 937, in render
    bit = node.render_annotated(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\defaulttags.py", line 209, in render
    nodelist.append(node.render_annotated(context))
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 993, in render
    return render_value_in_context(output, context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 972, in render_value_in_context
    value = str(value)
  File "C:\Python36\lib\site-packages\django\utils\html.py", line 397, in <lambda>
    klass.__str__ = lambda self: mark_safe(klass_str(self))
  File "C:\Python36\lib\site-packages\django\forms\boundfield.py", line 33, in __str__
    return self.as_widget()
  File "C:\Python36\lib\site-packages\django\forms\boundfield.py", line 93, in as_widget
    renderer=self.form.renderer,
TypeError: render() got an unexpected keyword argument 'renderer'
[14/Feb/2019 23:50:31] "POST /en/cms_wizard/create/ HTTP/1.1" 500 291959

GSoC 2019 - Add a linter

Is your feature request related to a problem? Please describe.
Add linting support. Linting would help us maintain code quality and hence help new contributors understand the code better.

Describe the solution you'd like
Add flake8 with these plugins: flake8-docstrings, pep8-naming, flake8-import-order

I suggest using the Pre-commit framework for doing it. This would automate the checking of predefined hooks like flake8(https://flake8.pycqa.org/en/latest/user/using-hooks.html)

GSoC 2019 - Depreciation warnings

Warnings when running with -Wall

C:\Python36\lib\site-packages\cms\utils\apphook_reload.py:14: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  from imp import reload
C:\Python36\lib\site-packages\cms\utils\apphook_reload.py:14: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  from imp import reload

Needs to be fixed in django cms, opened issue #6615 on django cms. If you submit a pr to fix this to them please let us know here.

GSoC 2019 - Send email template

This task is to add the ability to send an email based on templates.

You will need to create at least 2 basic templates and have the system able to be told which template to use and send an email to the specified address using that template.

Bonus points: Be able to specify data to replace in the templates for example "Name"

Extend runcron management command

This task is to extend the runcron command so that it reads from a "scheduler" model and does the tasks as specified when manage.py runcron process_items is called.

The schdeuler model would have 3 fields, one field would be the "command" to run, the other would be the "data", the last would be a "success" field. Storing the items in the data field in the model in json would probably be easiest.

For example, the model would include things such as "send_email" which would take the "data" field and call the sendemail function.

You will also need to add arguments to runcron for "build_items" and "process_items" as well as when ran without arguments it would run build_items then process_items in order.

3.6 test branch error

On the 3.6 test branch when you login you get the following error

OperationalError at /

no such table: main.auth_user

Request Method: | GET
-- | --
http://127.0.0.1:8000/
2.1.7
OperationalError
no such table: main.auth_user
C:\Python36\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 298
C:\Python36\python.exe
3.6.8
['D:\\development\\python-blog\\test',  'C:\\Python36\\python36.zip',  'C:\\Python36\\DLLs',  'C:\\Python36\\lib',  'C:\\Python36',  'C:\\Python36\\lib\\site-packages']
Thu, 14 Feb 2019 16:20:18 -0800

seems that the updated django version of 2.1.7 is the issue as 1.11.20 works after reverting urls.py

GSoC 2019 - Fix Migrations

Currently, 2 databases are used, default and auth_db. This task is to fix the django setup so that normal migration commands work on auth_db without just sticking all the possible tables into the auth_db.

For an example of the problem

[root@localhost pythongsoc]# python3.6 manage.py migrate --database auth_db
Operations to perform:
  Apply all migrations: admin, auth, cms, cmsplugin_filer_image, contenttypes, djangocms_blog, djangocms_column, djangocms_file, djangocms_googlemap, djangocms_link, djangocms_picture, djangocms_snippet, djangocms_style, djangocms_text_ckeditor, djangocms_video, easy_thumbnails, filer, menus, sessions, sites, taggit
Running migrations:
  Applying cmsplugin_filer_image.0003_mv_thumbnail_option_to_filer_20160119_1720...Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute
    return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: cmsplugin_filer_image_thumbnailoption

The above exception was the direct cause of the following exception:

Traceback

 (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python3.6/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python3.6/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python3.6/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 204, in handle
    fake_initial=fake_initial,
  File "/usr/lib/python3.6/site-packages/django/db/migrations/executor.py", line 115, in migrate
    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/usr/lib/python3.6/site-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/usr/lib/python3.6/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/usr/lib/python3.6/site-packages/django/db/migrations/migration.py", line 129, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "/usr/lib/python3.6/site-packages/django/db/migrations/operations/special.py", line 193, in database_forwards
    self.code(from_state.apps, schema_editor)
  File "/usr/lib/python3.6/site-packages/cmsplugin_filer_image/migrations/0003_mv_thumbnail_option_to_filer_20160119_1720.py", line 9, in move_thumbnail_opt_to_filer
    for obj in ThumbnailOption.objects.all():
  File "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 250, in __iter__
    self._fetch_all()
  File "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 1121, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 53, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
  File "/usr/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 899, in execute_sql
    raise original_exception
  File "/usr/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 889, in execute_sql
    cursor.execute(sql, params)
  File "/usr/lib/python3.6/site-packages/django/db/backends/utils.py", line 79, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "/usr/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python3.6/site-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/lib/python3.6/site-packages/django/utils/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: cmsplugin_filer_image_thumbnailoption

GSoC 2019 - Custom registration url

This issue is to create the ability to generate registration urls such as http://127.0.0.1:8000/en/register?id=56ac0bfd-5506-40d4-b2cb-eb30e02b8bec

Would have to be able to access these generated url's from a custom admin page, on that page would need to be able to see used/unused url's, generated date, and generate more

This url would be unique and only usable for one registration. It would bring the user to a page that would ask for user/pass/email and then create a user based on that information.

For the url unique string just use a RFC 4122 UUID

UI inconsistencies

Some UI elements of the website are inconsistent. These examples will help understanding them better.

  • The top bar is not fixed to the top and the height doesn't match.
    Screenshot 2019-03-27 at 2 13 03 PM

  • In mobile view the top bar breaks and also it is impossible to access the menu.
    Screenshot 2019-03-27 at 2 13 25 PM

  • The notifications on the top goes below the sidebar.
    Screenshot 2019-03-27 at 2 13 56 PM

These can be fixed to get a responsive and clean UI.

recreating database throws error

If you remove the databases and then recreate them using migrations you get errors on missing tables

Request Method: | GET
-- | --
http://127.0.0.1:8000/
2.1.7
OperationalError
no such table: main.auth_user
C:\Python36\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 298
C:\Python36\python.exe
3.6.8
['D:\\development\\python-blog\\python-blogs',  'C:\\Python36\\python36.zip',  'C:\\Python36\\DLLs',  'C:\\Python36\\lib',  'C:\\Python36',  'C:\\Python36\\lib\\site-packages']
Thu, 14 Feb 2019 17:33:44 -0800



Internal Server Error: /en/
Traceback (most recent call last):
  File "C:\Python36\lib\site-packages\cms\toolbar\toolbar.py", line 224, in get_user_settings
    user_settings = UserSettings.objects.select_related('clipboard').get(user=self.request.user)
  File "C:\Python36\lib\site-packages\django\db\models\query.py", line 399, in get
    self.model._meta.object_name
cms.models.settingmodels.UserSettings.DoesNotExist: UserSettings matching query does not exist.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python36\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
    return self.cursor.execute(sql, params)
  File "C:\Python36\lib\site-packages\django\db\backends\sqlite3\base.py", line 298, in execute
    return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: main.auth_user

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Python36\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
    response = get_response(request)
  File "C:\Python36\lib\site-packages\django\utils\deprecation.py", line 90, in __call__
    response = self.process_request(request)
  File "C:\Python36\lib\site-packages\cms\middleware\toolbar.py", line 100, in process_request
    request.toolbar = CMSToolbar(request)
  File "C:\Python36\lib\site-packages\cms\toolbar\toolbar.py", line 129, in __init__
    self.init_toolbar(request, request_path=request_path)
  File "C:\Python36\lib\site-packages\cms\toolbar\toolbar.py", line 189, in init_toolbar
    user_settings = self.user_settings
  File "C:\Python36\lib\site-packages\django\utils\functional.py", line 37, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "C:\Python36\lib\site-packages\cms\toolbar\toolbar.py", line 205, in user_settings
    return self.get_user_settings()
  File "C:\Python36\lib\site-packages\cms\toolbar\toolbar.py", line 230, in get_user_settings
    user=self.request.user,
  File "C:\Python36\lib\site-packages\django\db\models\manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "C:\Python36\lib\site-packages\django\db\models\query.py", line 413, in create
    obj.save(force_insert=True, using=self.db)
  File "C:\Python36\lib\site-packages\django\db\models\base.py", line 718, in save
    force_update=force_update, update_fields=update_fields)
  File "C:\Python36\lib\site-packages\django\db\models\base.py", line 748, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "C:\Python36\lib\site-packages\django\db\models\base.py", line 831, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File "C:\Python36\lib\site-packages\django\db\models\base.py", line 869, in _do_insert
    using=using, raw=raw)
  File "C:\Python36\lib\site-packages\django\db\models\manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "C:\Python36\lib\site-packages\django\db\models\query.py", line 1136, in _insert
    return query.get_compiler(using=using).execute_sql(return_id)
  File "C:\Python36\lib\site-packages\django\db\models\sql\compiler.py", line 1289, in execute_sql
    cursor.execute(sql, params)
  File "C:\Python36\lib\site-packages\debug_toolbar\panels\sql\tracking.py", line 186, in execute
    return self._record(self.cursor.execute, sql, params)
  File "C:\Python36\lib\site-packages\debug_toolbar\panels\sql\tracking.py", line 124, in _record
    return method(sql, params)
  File "C:\Python36\lib\site-packages\django\db\backends\utils.py", line 100, in execute
    return super().execute(sql, params)
  File "C:\Python36\lib\site-packages\django\db\backends\utils.py", line 68, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "C:\Python36\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "C:\Python36\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
    return self.cursor.execute(sql, params)
  File "C:\Python36\lib\site-packages\django\db\utils.py", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "C:\Python36\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
    return self.cursor.execute(sql, params)
  File "C:\Python36\lib\site-packages\django\db\backends\sqlite3\base.py", line 298, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: main.auth_user
[14/Feb/2019 19:01:28] "GET /en/?edit HTTP/1.1" 500 198273

to reproduce

rm *.db
manage.py migrate 
manage.py migrate --database auth_db
python manage.py createsuperuser  --database auth_db
manage.py runserver

downgrading to django 1.11.20 and changing the urls.py makes it work with runserver

-from django.urls import path
-path('admin/', admin.site.urls),
+url('admin/', admin.site.urls),

after logging in with 1.11.20 it continues to work even after a re-upgrade to 2.1.7

GSoC 2019 - Add Student Menu Form

issue #37 is related

We need to have an admin menu item for adding students to the platform.

The admin toolbar item would need to have the following

  1. Form for adding students with the following fields, email, name, project, suborg, year and all fields required to be filled in
  2. A "+" for adding more than one student at a time in a form list.
  3. The suborg and year would be selectable from the current model as a dropdown
  4. After submitting the form it would add a user with those settings for each item in the form list

GSoC 2019 - Add upload to ckeditor image widget

This task is to have a user to select a file as part of the ckeditor wysiwyg editor image insert button. This would need to auto upload the file to the server rather than ask to select a url.

Could also just convert the image to a source tag rather than uploading it, for example

<img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" width="0" height="0" alt="" />

Maybe easier than dealing with uploading files.

GSoC 2019 - Add features to rich text editor

The wysisyg editor is missing a few important features

  1. Image support, this would need to allow users to add images to the blog post

would need to support the setting of width and height

https://ckeditor.com/cke4/addon/image2 may be helpful

  1. youtube support, need to be able to add a youtube video by adding the video url, for example

https://youtu.be/KjelB1bCBzU

would be converted to

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/KjelB1bCBzU" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Also would need to be able to specify the width and height

https://ckeditor.com/cke4/addon/youtube may be helpful

Also i found https://www.diehlworks.com/en/blog/customize-ckeditor-in-django-cms/

GSoC 2019 - Add information tag for blogs

This issue is to add a notification block that will display at the top of the screen that can be used to display data to a specific page when enabled. An initial example is a notification with a link to a students non GSoC blog. This would be enabled by the student on their own blog page so it would use the page-specific create permission in django cms.

Fix register page when registered with empty email

When registering a new user with register links, if the user leave the email input as blank, MultipleObjectsReturned will be raised.

Also if no error raised, the page will say "Your email has been used".

GSoC 2019 - Create Page For All Blogs

For this issue, you will need to add a few blogs to the system. There is an example "Student Blogs" page already. you can add more by following https://aldryn-newsblog.readthedocs.io/en/latest/how-to/apphook_configurations.html.

Additionally you will need to add some users that are assigned to the "students" group and have a suborg and year set on them.

This task is to make a single page that displays all blogs on the system together by year. An example would be something like https://blogs.python-gsoc.org/ for each year, newest to oldest

GSoC 2019 - Add theme for blogs

This task is to theme the blog pages, as well as the blog posts so that the layout looks in line with the site as well as works on mobile etc.

GSoC 2019 - new person error

Adding a new person (not user) throws an error

This is likely an error from a dependent package, may need to push a fix upstream.


Request Method: | POST
-- | --
http://127.0.0.1:8000/en/cms_wizard/create/
2.1.7
TypeError
render() got an unexpected keyword argument 'renderer'
C:\Python36\lib\site-packages\django\forms\boundfield.py in as_widget, line 93
C:\Python36\python.exe
3.6.8
['D:\\development\\python-blog\\python-blogs',  'C:\\Python36\\python36.zip',  'C:\\Python36\\DLLs',  'C:\\Python36\\lib',  'C:\\Python36',  'C:\\Python36\\lib\\site-packages']
Thu, 14 Feb 2019 22:50:30 -0800

[14/Feb/2019 23:49:37] "GET /en/cms_wizard/create/?page=21&language=en&edit&cms_path=/en/test/test123/ HTTP/1.1" 200 13648
Internal Server Error: /en/cms_wizard/create/
Traceback (most recent call last):
  File "C:\Python36\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
    response = get_response(request)
  File "C:\Python36\lib\site-packages\django\core\handlers\base.py", line 156, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "C:\Python36\lib\site-packages\django\core\handlers\base.py", line 154, in _get_response
    response = response.render()
  File "C:\Python36\lib\site-packages\django\template\response.py", line 106, in render
    self.content = self.rendered_content
  File "C:\Python36\lib\site-packages\django\template\response.py", line 83, in rendered_content
    content = template.render(context, self._request)
  File "C:\Python36\lib\site-packages\django\template\backends\django.py", line 61, in render
    return self.template.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 171, in render
    return self._render(context)
  File "C:\Python36\lib\site-packages\django\test\utils.py", line 96, in instrumented_test_render
    return self.nodelist.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 937, in render
    bit = node.render_annotated(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "C:\Python36\lib\site-packages\django\test\utils.py", line 96, in instrumented_test_render
    return self.nodelist.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 937, in render
    bit = node.render_annotated(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "C:\Python36\lib\site-packages\django\test\utils.py", line 96, in instrumented_test_render
    return self.nodelist.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 937, in render
    bit = node.render_annotated(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "C:\Python36\lib\site-packages\django\test\utils.py", line 96, in instrumented_test_render
    return self.nodelist.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 937, in render
    bit = node.render_annotated(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 937, in render
    bit = node.render_annotated(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 937, in render
    bit = node.render_annotated(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\loader_tags.py", line 188, in render
    return template.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 173, in render
    return self._render(context)
  File "C:\Python36\lib\site-packages\django\test\utils.py", line 96, in instrumented_test_render
    return self.nodelist.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 937, in render
    bit = node.render_annotated(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\defaulttags.py", line 209, in render
    nodelist.append(node.render_annotated(context))
  File "C:\Python36\lib\site-packages\django\template\base.py", line 904, in render_annotated
    return self.render(context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 993, in render
    return render_value_in_context(output, context)
  File "C:\Python36\lib\site-packages\django\template\base.py", line 972, in render_value_in_context
    value = str(value)
  File "C:\Python36\lib\site-packages\django\utils\html.py", line 397, in <lambda>
    klass.__str__ = lambda self: mark_safe(klass_str(self))
  File "C:\Python36\lib\site-packages\django\forms\boundfield.py", line 33, in __str__
    return self.as_widget()
  File "C:\Python36\lib\site-packages\django\forms\boundfield.py", line 93, in as_widget
    renderer=self.form.renderer,
TypeError: render() got an unexpected keyword argument 'renderer'
[14/Feb/2019 23:50:31] "POST /en/cms_wizard/create/ HTTP/1.1" 500 291959

Upgrade to Django CMS 3.7 & Django 2.2

This is for tracking the upgrade to the django lts and django cms lts release that will be out just before GSoC starts.

Nothing to do on this just yet... but we should try and keep it in mind and get as close as possible to avoid major work at that point. Pretty important to be on the lts release's so that maintenance is easier.

GSoC 2019 - Add test framework

This task is to add a test framework for the project, this would involve adding test frameworks such as Travis, landscape, and pylint integration files to test pr's before committing.

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.