summaryrefslogtreecommitdiff
path: root/pgweb/profserv/models.py
AgeCommit message (Collapse)Author
2021-01-14Move the hint message for organisation to its own fileMagnus Hagander
This is way too much text to duplicate across many places..
2020-09-10Re-work moderation of submitted itemsMagnus Hagander
This includes a number of new features: * Move some moderation functionality into shared places, so we don't keep re-inventing the wheel. * Implement three-state moderation, where the submitter can edit their item and then explicitly say "i'm done, please moderate this now". This is currently only implemented for News, but done in a reusable way. * Move moderation workflow to it's own set of URLs instead of overloading it on the general admin interface. Admin interface remains for editing things, but these are now separated out into separate things. * Do proper stylesheet clearing for moderation of markdown fields, using a dynamic sandboxed iframe, so it's not ruined by the /admin/ css. * Move moderation email notification into dedicated moderation code, thereby simplifying the admin subclassing we did which was in some places quite fragile. * Reset date of news postings to the date of their approval, when approved. This avoids some annoying ordering issues.
2020-03-31Set on_delete=models.CASCADE on all ForeignKey fieldsMagnus Hagander
This is the bardware compatible value that will be needed once we upgrade django later.
2019-01-26Generic unicode updatesMagnus Hagander
2019-01-17Fix whitespace and indentation, per pep8Magnus Hagander
2019-01-17Tabs, meet your new overlords: spacesMagnus Hagander
In a quest to reach pep8, use spaces to indent rather than tabs.
2018-04-15Add "mailto" anchor to Professional ServicesJonathan S. Katz
2017-11-29Clean up whitespace in primary Python / HTML filesJonathan S. Katz
Clean up the whitespace in the primary Python / HTML files in order to make it easier to apply changes going forward.
2016-05-14Fix model warnings and deprecationsMagnus Hagander
1. ForeignKey with unique -> OneToOneField 2. IPAddressField -> GenericIPAddressField 3. Fix fields with default=datetime.now() which gives server start time, not the insert time (clearly this default was never used, and the field was always explicitly set, but it should still not be incorrectly defined)
2016-03-07Get rid of PgModel, replacing it with simple signalsMagnus Hagander
We were already using signals for everything except delete, and even in our old version of django the delete signal exists (it didn't exist when this code was first written). Django doesn't really like models to be OOP like this, so keeping PgModel would cause issues with upcoming changes in django 1.8. Using simple functions is easier, and the actual functionality is replicated straight off.
2014-01-01Clean up importsMagnus Hagander
Remove unused imports and some other completely unused code.
2012-06-29One more spot missed when renaming organisation fieldMagnus Hagander
2012-06-26Rename organisation->org in ProfessionalService modelMagnus Hagander
This is requied to support notifications, and good for consistency in general.
2012-01-20Add help texts refering to the organisation list on forms that take an ↵Magnus Hagander
organisation field For those who don't read the introduction page under my account, per request from Dave.
2011-11-27Remove submitter field from professional servicesMagnus Hagander
The rest of the code already dealt with profservs attached to organisations, but the existance of tihs field causded the validation to reject any updates since this field is wrong. Instead, create a verify_submitter() function that checks the permissions on the organisation. This fixes #98
2011-11-27All purge_urls must be rooted, since we add ^ at the beginningMagnus Hagander
2011-08-24Each organisation should only be able to have one professional serviceMagnus Hagander
2011-08-24Set verbose name for fields in professional servicesMagnus Hagander
2011-06-14Implement basic varnish purgingMagnus Hagander
This allows all models inherited from PgModel to specify which URLs to purge by either setting a field or defining a function called purge_urls, at which point they will be purged whenever the save signal is fired. Also implements a form under /admin/purge/ that allows for manual purging. This should probably be extended in the future to show the status of the pgq slaves, but that will come later. Includes a SQL function that posts the expires to a pgq queue. For a local deployment, this can be replaced with a simple void function to turn off varnish purging.
2010-02-25Make professional services also use organisationsMagnus Hagander
2009-09-14A first very basic import.Magnus Hagander
Contains basic functionality, and an import of most of the static content from the old site. There is still plenty more to do...