summaryrefslogtreecommitdiff
path: root/postgresqleu/newsevents/models.py
AgeCommit message (Collapse)Author
2020-04-12Enable full timezone managementMagnus Hagander
Switch the system to properly use django and postgres timezone support, by allowing each conference to render all date related information in a conference specific timezone (using the one that has already been specified on the conference, per a previous commit). All non-conference parts of the system keep using the default timezone as specified in settings.TIME_ZONE. This includes a migration that updates the existing sessions, session slots and volunteer slots based on what timezone has been configured for the conference (since previously everything was stored in the wrong timezone if the conference was in anything but the default one). In order to make this work for non-django-orm queries, a context manager that swaps the timezone to the conference and back out is introduced, and related to that a way to get a cursor that turns off django's protection against doing exactly this. This finally removes the very ugly "timediff" column on the conference which was a quick hack back in the days to support ical feeds using utc. In passing, this also: * Fixes ical feeds to include all required fields (uid and dtstamp were missing on schedule entries) * Fixes xml feed to use conference local time (fixes #8) * Clarify what "valid until" and "active until" means in the help text on discount codes and registration tpes. * Don't duplicate dates in schedule xml feeds (seems others don't, and there is no clear spec anywhere that I can find)
2020-04-01Specify on_delete for all ForeignKey and OneToOneFieldsMagnus Hagander
This was already done once in 8289e05cd but had not been properly maintained.
2020-03-25Implement native pages for conference news articlesMagnus Hagander
This means each conference news now gets a proper permanent link going to /events/<conference>/news/<slug>-<id>/, and this is the link that's put out in the RSS feeds. A page is created at /events/<conference>/news/ which contains the full news history for the conference. This creates a new "section" in the templates called "news", for those skins that care about the section. Fixes #44
2019-07-08Fix urlname validatorsMagnus Hagander
Previously some urlname fields used different rules to validate the urlname, that were not always in sync with what the regexps actually matching them did, causing incorrect 404s. Fix this by centralizing around a "urlname validator" which allows a-z, 0-9 and underscore (but specifically, not dash).
2019-01-10Replace __unicode__ with __str__Magnus Hagander
2to3 doesn't do this automatically, probably because weird things can happen if you had both. We know we didn't, so just do a straight replacement.
2018-12-17Fix verbose names on a few fieldsMagnus Hagander
2018-12-14Fix blankline related warningsMagnus Hagander
2018-12-14Fix spaces before/after comma and colonMagnus Hagander
Mostly not important, but getting rid of the PIP warnings will help catch errors in the future.
2018-12-14Replace tabs with spacesMagnus Hagander
In an effort to close up with PEP8, we should use spaces for indent rather than tabs... Time to update your editor config!
2018-10-09Cleaner implementation of Twitter integrationMagnus Hagander
In particular this allows configuring the twitter integration from within the browser, when setting up different integration points for different conferences. It supports posting conference news as well as global news, but global news is still configured in the local_settings.py file.
2018-09-23Revamp and expand news handlingMagnus Hagander
A number of improvements and unifications for news: * News posts now get authors * Authors are from NewsPosterProfile:s, which will include a full name and an "urlname" * Authors can also be specified as "can post global", which should give rights to post on the global feed. Right now the global feed requires superuser access anwyay, but for the future... * News can now be posted at conference level as well as previous global only * Front page of website pulls in a combination of global news and conference news. Global news can be given a "high priority until" field that ensure it sits at the top of the frontpage until a certain date, so conference news can't push it off. * Each conference gets it's own RSS feed. This one is also available via JSON for an easy way to pull it into the conference site itself. * All links to posts in the conference feed goes to the conference homepage. It's really only designed for transient news. * Each user also gets it's own RSS feed. This is designed so that it can be submitted to an aggregator like Planet PostgreSQL which requires personal feeds. Conference specific news are automatically prefixed by conference name. * Each post can individually be toggled if it should be included in the RSS feed or not * Re-adds the news archive, with a paginated view * Each post can individually be toggled for inclusion in the news archive, so it's possible to create more transient news. News archive *only* contains news from the global feed, not the conference feeds. * Makes the "read more" button on the frontpage only show up if the entire news post did not fit
2018-09-02Remove support for standalone eventsMagnus Hagander
It wasn't actively used for a long time, having been replaced with our full confreg system.
2009-02-23Make the news list show up as News not Newss in the admin interface.Magnus Hagander
2009-02-20Make news and events read from the database.Magnus Hagander
Enable admin interface to edit news and events. Add countries module to reference for events. Implement RSS feeds for news and events.