Commit Graph

22 Commits

Author SHA1 Message Date
e151c08218 Update migrations for py3
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-02-10 14:48:34 +01:00
a156829375 Generic unicode updates 2019-01-26 16:19:26 +01:00
7547b6f766 Update syntax for relative imports 2019-01-26 16:19:26 +01:00
0883ac6423 Fix whitespace and indentation, per pep8 2019-01-17 20:47:43 +01:00
87237f6536 Tabs, meet your new overlords: spaces
In a quest to reach pep8, use spaces to indent rather than tabs.
2019-01-17 15:35:39 +01:00
fd37389a3b Replace NavContext and render_to_response with render_pgweb
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.
2018-03-10 10:38:11 -05:00
2f52c4f7c4 Clean up whitespace in primary Python / HTML files
Clean up the whitespace in the primary Python / HTML files in
order to make it easier to apply changes going forward.
2017-11-29 08:21:35 -05:00
8150cb47a3 Allow contributor emails to be blank
Over the years, contributors come and go and we have many cases now where
the contributor's email address which we have is not valid.  As we really
don't want to show incorrect information on the webpage, allow contributor
email addresses to be blank for cases where we've discovered that the email
address is no longer valid.
2017-07-18 21:29:24 +02:00
0585a97556 Fix whitespace 2017-05-25 09:55:52 -04:00
3b6f269cfb Add ability to hide emails per contributor type
This makes it possible to hide emails from past contributors, which are
more likely to not be correct anyway.
2017-05-25 09:54:49 -04:00
27e1c73368 Implement auto-complete for /admin/ forms that reference User
We have so many users now that loading these forms take forever.
Instead, implement a textbox with autocomplete using django-selectable,
which will not load the whole list of users at once.
2016-06-23 17:59:45 +02:00
a8500c3853 Add migrations for all existing models
When migrating on existing installations, run the

python manage.py migrate --fake-initial

command.
2016-05-14 19:49:12 +02:00
8058accee0 Get rid of PgModel, replacing it with simple signals
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.
2016-03-07 21:41:45 +01:00
94e3b79dce Replace wildcard imports with explicit ones 2014-01-01 16:33:52 +01:00
756aa6ffbe Clean up imports
Remove unused imports and some other completely unused code.
2014-01-01 15:42:30 +01:00
5f784d0e64 Make it possible for a contributor to edit his/her own data
Only for users that are already listed under /community/contributors/,
make it possible to edit this data, so we don't have to track it manually.
For obvious reasons, we don't allow editing of the "contributor level"
field...

This also changes the contributors model to send a notification to
the slaves list whenever a contributor record is changed, so we can do
post-moderation if necessary.
2013-12-29 14:52:43 +01:00
3966b4b20d Add a link from contributors to their userid
This will be used to allow users to edit their own contributor records.

Requires SQL:
ALTER TABLE contributors_contributor add column "user_id" integer REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED;
CREATE INDEX "contributors_contributor_user_id" ON "contributors_contributor" ("user_id");
UPDATE contributors_contributor set user_id=(select id from auth_user where auth_user.email=contributors_contributor.email) where contributors_contributor.email is not null;
2013-12-29 14:11:37 +01:00
5bcbf1253e All purge_urls must be rooted, since we add ^ at the beginning 2011-11-27 13:31:20 +01:00
f92709d2a6 Implement basic varnish purging
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.
2011-06-14 19:48:48 +02:00
22f5578c29 Add support for generating sitemap.
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-28 16:12:13 +02:00
c24eea14ab Initial data must not live in initial_data.yaml, that will cause the data that's currently
in the database to be overwritten... Put it in a separate file, and add a script that will
automatically load all these files if present.
2009-09-16 13:16:04 +02:00
90b758c247 A first very basic import.
Contains basic functionality, and an import of most of the static content
from the old site.

There is still plenty more to do...
2009-09-14 14:39:25 +02:00