Commit Graph

1198 Commits (4a268ff5909b6edccd3e7eb11913c80c27300d3f)

Author SHA1 Message Date
Anler Hp 40260c82ad Tasks: class-based to function-based services 2014-07-11 01:04:17 +02:00
Andrey Antukh 6068c7e6e1 Minor fixes. 2014-07-10 19:57:22 +02:00
David Barragán Merino 741fac4d65 Merge pull request #60 from taigaio/invitations
Store info of user that created an invitation
2014-07-10 15:11:23 +02:00
Anler Hp fac84dae7c Store info of user that created an invitation 2014-07-10 14:15:39 +02:00
Andrey Antukh 579f7036a6 Merge pull request #59 from yamila-moreno/patch-2
Update common.py
2014-07-09 17:41:27 +02:00
Yamila 20d895406e Update common.py
Deleted context_processor because it's for development purposes. It's already in development settings.
2014-07-09 17:40:46 +02:00
David Barragán Merino a1349416ce Merge pull request #57 from yamila-moreno/patch-1
Update celery.py
2014-07-09 15:41:38 +02:00
Yamila 0b4612de68 Update celery.py 2014-07-09 15:41:13 +02:00
David Barragán Merino 8292a11170 Add email to the forgot-password response 2014-07-09 14:10:58 +02:00
David Barragán Merino a07c6a9590 Fix the urls dict of the module front 2014-07-08 12:47:48 +02:00
Anler Hp 558ac79c5d Validate project slug to be unique 2014-07-07 13:47:12 +02:00
Alejandro Alonso 9c5bb7ff55 Fixing validator for milestone creation 2014-07-07 11:05:16 +02:00
Anler Hp 52f476fb34 Check permissions when accessing attachments
Attachment files dispatching is now done through `RawAttachmentView`
view that checks for appropiate permissions.

When using the development server this view just redirects to the real
media path of the file.

When using the production server the special redirection header
`X-Accel-Redirect` is used instead to improve efficiency by instructing
the server to dispatch the file instead of django, but you also need the
following configuration (Nginx):

location /attachment-files {
    internal;
    alias /path/to/taiga/media/attachment-files;
}

It's recommended to also restrict the direct access from outside to the
`attachment-files` directory by using some configuration like this:

location /media/attachment-files {
    deny all;
}
2014-07-04 12:15:48 +02:00
Anler Hp 9b8531d562 Removing unnecessary package (included by mistake) 2014-07-03 12:35:06 +02:00
Anler Hp 3d8c47a830 Return tags with count in `/<T>_filters_data` urls 2014-07-03 11:47:33 +02:00
Anler Hp 1e2358d0a9 Fix invalid keyword error flat 2014-07-03 09:54:57 +02:00
Andrey Antukh ec398a1d43 Merge pull request #54 from taigaio/taskqueues
Integration with RabbitMQ and Celery
2014-07-03 09:21:07 +02:00
Anler Hp 11564a95a6 Return members' photo in project detail api 2014-07-02 14:51:29 +02:00
Anler Hp 0ff888df53 Support for CELERY_ALWAYS_EAGER 2014-07-02 13:40:36 +02:00
Anler Hp 24e9d92af1 Decorator for overriding settings while testing
Usage:
```
from tests.utils import set_settings

@set_settings(FOO='bar')
def test_something():
    ...
```
2014-07-02 13:34:14 +02:00
David Barragán Merino a2b8a38016 Revert last commit in base.utils.urls 2014-07-02 13:29:29 +02:00
Anler Hp 0e414267db Integration with RabbitMQ and Celery
First update taiga-vagrant vm if you're using it, you will have access
to the rabbit management console at port 8001 of the host machine.

* Defining tasks
- Tasks must be defined in a `deferred` module of an app, for example,
`taiga.projects.deferred` module.
- Tasks must be decorated and given the name "<app>.<task-name>", for
example in `taiga.projects.deferred` module:
```
from taiga.celery import app

@app.task(name="projects.add")
def add(x, y):
    return x + y
```
- Tasks should be at most just wrappers around service functions to
promote re-usability of those functions from other parts of the code,
say, management commands and the like.

* Calling tasks
Tasks should be called using one of the three functions defined in
`taiga.deferred` module:

- `defer`: Use this function if you need to perform some task
asynchronously and GET THE RESULT back later, for example:
```
result = defer("projects.add", x=1, y=2)
...
result.get() # => 3
```

- `call_async`: Use this function when you want to fire off some
task. No result is get back. For example:
```
call_async("projects.email_user", user)
```

- `apply_async`: Is the same as `call_async` but since it's a function
application and you must pass the args and kwargs together as one
parameter each you are allowed to pass celery-specific
extra-options (but bear in mind this is not recommended!)
```
apply_async("projects.email_user", args=(user,), kwargs={}, routing_key="tasks.email")
```
2014-07-02 09:49:56 +02:00
David Barragán Merino 625c705807 Update urls.py 2014-07-02 08:14:51 +02:00
David Barragán Merino 4a21e00b6f Update README.rst 2014-07-02 08:08:48 +02:00
Anler Hp a8085a2feb Return user photo cropped and with absolute url
Remember to run `pip install -r requirements.txt` to install the
additional dependencies.
2014-07-01 14:38:26 +02:00
Anler Hp 5ff7ec1c00 Return user's gravatar if has no photo set
If the user has no photo set use her gravatar image if available
otherwise use the default avatar image defined in
`settings.DEFAULT_AVATAR_URL`
2014-07-01 12:46:58 +02:00
Alejandro Alonso 5892841fe5 Fixing admin 2014-07-01 08:53:03 +02:00
David Barragán Merino f47e672051 Add full_name_display to the user serializer 2014-06-29 02:14:36 +02:00
David Barragán Merino b652cdc5f2 Add request to requirements 2014-06-29 02:13:03 +02:00
David Barragán Merino 10afb4b5b4 Merge pull request #53 from taigaio/bugfixes
Bugfixes
2014-06-27 14:22:35 +02:00
Anler Hp cfc35d5ed2 Required estimated-start/end dates for milestones 2014-06-27 14:07:50 +02:00
Anler Hp 95a708dd59 Project api should return all roles 2014-06-27 12:22:41 +02:00
Alejandro Alonso 19a8dc14c8 Fixing milestone serializer, adding duplicated name validation 2014-06-26 16:58:48 +02:00
Anler Hp e2b8687980 Bugfix: Reload version attr in OCC 2014-06-26 09:59:44 +02:00
Alejandro Alonso 077de2bf4e Updating occ tests 2014-06-25 16:19:40 +02:00
David Barragán Merino 20c6e09787 Merge pull request #52 from taigaio/tweaks
Optimizing `Project.update_role_points` method
2014-06-24 12:54:06 +02:00
Anler Hp 0a3a33aac5 Optimizing `Project.update_role_points` method 2014-06-24 12:38:29 +02:00
David Barragán Merino ba8a7a3451 Remove 60 2014-06-23 20:09:56 +02:00
Alejandro Alonso 9b97a4a9c6 Fixing bug when creating objects with OCCResourceMixin 2014-06-23 16:22:08 +02:00
Anler Hp e98d666a40 Removing unnecessary setup of test database
We are already using pg arrays so the unpickle function in sql/tags.sql
is not needed, at least by the moment. I'm removing it because it was
entering in an infinite loop when creating the test database.
2014-06-23 12:26:17 +02:00
Anler Hp a222b0d9f8 Fix ImproperlyConfigured except when creating US 2014-06-23 12:11:52 +02:00
Anler Hp 7ab671fea7 Fix invalid use of F() when creating user story 2014-06-23 12:11:02 +02:00
Anler Hp c89c6e7c31 Merge pull request #51 from taigaio/tags
Tags using pg arrays
2014-06-23 11:34:02 +02:00
Anler Hp 7ebe443394 Adding models.Model explicitly to tagged models 2014-06-23 10:58:14 +02:00
Anler Hp a8e54fb785 Support parametrized urls in the api root view
Generating the api root view was failing because urls like this

`issues/(?P<issue_id>\\d+)/voters`

cannot be reversed without the appropriate params.
2014-06-23 10:21:04 +02:00
David Barragán Merino 76bc2ac426 Add more licenses agreements to the tests.integration module 2014-06-22 11:33:44 +02:00
David Barragán Merino 83aee6a253 Update AUTHORS 2014-06-22 11:30:19 +02:00
David Barragán Merino 270b315fdf Add more licenses agreements to the tests.unit module 2014-06-20 19:48:34 +02:00
Jesús Espino dd5b64edf3 Adding is_staff to users 2014-06-20 10:29:14 +02:00
David Barragán Merino 767024d0d5 Add more licenses agreements to the tests module 2014-06-19 22:46:31 +02:00