Skip to content
This repository has been archived by the owner on Dec 31, 2021. It is now read-only.

Improving submission module #168

Merged
merged 1 commit into from
May 13, 2014
Merged

Improving submission module #168

merged 1 commit into from
May 13, 2014

Conversation

ksurya
Copy link
Member

@ksurya ksurya commented May 6, 2014

  1. Remove submission.models.ZipFile

  2. Rewrite submission.forms.py using model forms

    a. submission.models now contains help text, labels for form fields

    NOTE: Making keywords bold to show in HTML is now not done.

  3. Rewrite views corresponding to create, edit submissions using class based views
    Removed functions from views.py:

    a. get_form(), create_or_edit_submission_revision(), get_license_text(), new_or_edit_submission(), edit_submission()

    New view handlers:

    a. BaseSubmission(), NewSubmission(), EditSubmission()

    NOTE: New view handlers no longer provide previewing functionality from server. Rather it is now handled with JavaScript

  4. Create new module views with create.py, show.py

    a. create.py contain views to create/edit submission

    b. show.py contain views to display

  5. Create new module submission.storage to handle storing of submissions in filesystem.

  6. Add new methods to filestorage.dvcs_wrapper.py

    a. remove(), purge(), update()

    NOTE: Needs to turn on purge extension in Mercurial (Hg) repository settings in .hgrc file on server

Minor Changes:

  1. URL Conf for new submission is changed
    from: r'^new/(?P<item_type>[a-zA-Z]+)/$
    to : r'^(?P<item_type>[a-zA-Z]+)/new/$'
  2. person.views.profile_page_edit view's item context is renamed to form to support default class based views context in submission/new-item.html

1. Remove `submission.models.ZipFile`
    ZIP files are no more staged
2. Rewrite `submission.forms.py` using model forms
    a. `submission.models` now contains help text, labels for form fields
    NOTE: Making keywords bold to show in HTML is now not done.
3. Rewrite views corresponding to create, edit submissions using class based views
    Removed functions, views from views.py:
        a. `get_form()`, `create_or_edit_submission_revision()`
           `get_license_text()`, `new_or_edit_submission()`,
           `edit_submission()`
    New view handlers:
        a. `BaseSubmission()`, `NewSubmission()`, `EditSubmission()`
        Some of the functions are still retained
        NOTE: New view handlers no longer provide previewing functionality from server. Rather it is now handled with JavaScript
4. Create new module `views` with `create.py`, `show.py`
    a. `create.py` contain views to create/edit submission
    b. `show.py` contain views to display
5. Create new module `submission.storage` to handle storing of submissions in filesystem.
6. Add new methods to `filestorage.dvcs_wrapper.py`
    a. `remove()`, `purge()`, `update()`
    NOTE: Needs to turn on `purge` extension in Mercurial (Hg) repository settings in `.hgrc` file on server

Minor Changes:

1. URL Conf for new submission is changed
    from: `r'^new/(?P<item_type>[a-zA-Z]+)/$`
    to  : `r'^(?P<item_type>[a-zA-Z]+)/new/$'`
2. submit button in `submission/new-item.html` is enhanced to disable on submitting the form to server using JavaScript
3. `person.views.profile_page_edit` view's `item` context is renamed to `form` to support default class based views context in `submission/new-item.html`
ksurya added a commit that referenced this pull request May 13, 2014
Improving submission module
@ksurya ksurya merged commit 08304d2 into scipy:master May 13, 2014
@ksurya ksurya deleted the new-sub branch May 13, 2014 04:50
@rgommers
Copy link
Member

@ksurya nice going!

@ksurya
Copy link
Member Author

ksurya commented May 13, 2014

@rgommers Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants