summaryrefslogtreecommitdiff
path: root/pgweb/profserv
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-26Add direct links to news/events/services policy from submission formsMagnus Hagander
No link for Products because we don't currently have a policy for them.
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-02-10Update migrations for py3Magnus Hagander
A lot of strings in the migrations needed a change from b' to ' to work after the migration to py3, but this was forgotten in the big patch. No actual changes included in this patch. A lot of strings in the migrations needed a change from b' to ' to work after the migration to py3, but this was forgotten in the big patch.
2019-01-26Generic unicode updatesMagnus Hagander
2019-01-26Update syntax for relative importsMagnus 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
2018-03-10Replace NavContext and render_to_response with render_pgwebMagnus Hagander
render_to_response does not work on newer django, so it needs to be replaced. And using a speicfic context actually overcomplicates things, it's easier to just use a wrapper function. For those cases where we don't need NavContext, just use render() (the new shortcut function from django), which also removes the need to use RequestContext.
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-24Replace login_required decorator with a validating oneMagnus Hagander
This one will validate that the url is under /accounts/, which is the only part we are going to be excluding from caching once we move the website to https-only.
2016-05-24Remove SSL decorators and middlewareMagnus Hagander
The site is now served regardless of SSL, and assumes that the webserver or web cache ensures that things rae always SSL.
2016-05-14Add migrations for all existing modelsMagnus Hagander
When migrating on existing installations, run the python manage.py migrate --fake-initial command.
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-05-14Fix long-standing incorrect select_related parameterMagnus Hagander
This was broken before, but older django versions didn't notice it was wrong and just ignored it. 1.8 throws an error, so now is a good time to fix it.
2016-05-14Prefix cross-application imports with pgwebMagnus Hagander
As required by the new project layout.
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-04-30Allow professional services to be searchable in the adminJonathan S. Katz
Enables an admin to search over professional services, and additionally filter the services by whether or not they are approved.
2014-01-01Replace wildcard imports with explicit onesMagnus Hagander
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-11-09Make account editing forms redirect back to list of objectsMagnus Hagander
Instead of like previously, redirect back to the list of object types.
2011-08-24Add edit for professional servicesMagnus 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-09-28Add support for generating sitemap.Magnus Hagander
Each module now contains a struct.py file that will return all the URLs that it can generate (yes, this is a small break of the abstraction of url.py, but we've broken that elsewhere as well), and also which search-engine-weight (0.1-1.0) that this URL should be given.
2010-09-28Remove leftover from copy/pasteMagnus Hagander
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...