scipy / SciPyCentral

SciPy Central
http://scipy-central.org
BSD 3-Clause "New" or "Revised" License
16 stars 12 forks source link

Django 1.5 - DO NOT MERGE #135

Open ksurya opened 10 years ago

ksurya commented 10 years ago

The below are the changes made (some minor changes might have been missed but can be found clearly in commit messages)

  1. Upgrade {% url %} template tag
  2. Use django-haystack 2.1.0, xapian-haystack 2.0.0, Whoosh 2.5.1 -- make respective changes in search_settings.py and search_indexes.py
  3. Use django-registration 1.0 -- Also move registration.backends.default.urls from scipy_central.urls to scipy_central.person.urls
  4. DVCS (windows specific) error fixed
  5. Use django transaction middleware, clickjacking middleware
  6. Make pages.views.page_404_error default 404 handler
  7. Add wsgi.py, change manage.py, upgrade slugify import, upgrade url conf import
  8. Fix os.path.normpath import
  9. Use paginator module for finding "next" or "prev" objects in Revision, Submission module
  10. Make UserProfile model compatible with django-1.5

[5] Django transaction middleware raises https://github.com/scipy/SciPyCentral/issues/132

Note: A deprecation warning is observed when starting the server regarding hashlib import. This is caused in django transactions middleware (It will be deprecated in 1.7. However, we require it at the moment until we have our own Middleware)

lomegor commented 10 years ago

@ksurya I think you included a lot of changes, that although probably necessary, are not at all related to Django 1.5. Why don't you create more PRs, each with their commits, neatly separated?

ksurya commented 10 years ago

I was thinking django-1.5 was more like improving existing code. Its why I added lots of code and simultaneously fixed very necessary bugs found.

Since each of the individual bug-fixing or improving code are quite small and confined to upgrading the packages and fixing relevant code, I added them in the same branch. Moreover, I discovered them when I started reading django-docs and other respective docs.

lomegor commented 10 years ago

No, django-1.5 is updating the code to work correctly with Django-1.5. Remove all commits that are not part of that, and create a PR for each one of them so it can be decided separately if they are needed and when to merge.

lomegor commented 10 years ago

Problems:

  1. The error I told you about in Search pages. Are you sure you are not getting it? Why could it be that I see it?
  2. I can't upload images on submissions. I get error "Error on server, please try again decoder jpeg not available". Please fix both the error message, and whatever is causing this.

I will look at the code now.

ksurya commented 10 years ago

yeah, you can't upload images. This is fixed in https://github.com/scipy/SciPyCentral/pull/141 PR

lomegor commented 10 years ago

I think commits 30c73e8 and a320450 shouldn't be here. Create new PRs for those.

lomegor commented 10 years ago

Also, there are conflicts between this PR and master, which means it can't be automatically merged. Fix them.

ksurya commented 10 years ago

@lomegor I have found why you were getting server error on search query.

django-haystack requires another module xapian-haystack and xapian-haystack bindings for python. If you install those, the search is going to work.

pip install xapian-haystack installs 1st module I mentioned. Unfortunately, xapian bindings are highly system dependent and we need to install packages based on it.

As requirements.txt never mentioned these packages, quickstart.py does not install and thus you get this error

ksurya commented 10 years ago

I have tested the commit you mentioned https://github.com/scipy/SciPyCentral/commit/a320450 The new changes in slugify() are causing UnicodeDecode error. I moved these changes to https://github.com/scipy/SciPyCentral/commit/983c851081d6d8898e15264671d369ec69a65fd8

These changes are required in the PR