-
Notifications
You must be signed in to change notification settings - Fork 102
417 sponsored jobs #424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
417 sponsored jobs #424
Conversation
… added ac.civil badget to pycompanies
|
@cmdelatorre Perdimos la historia del pull request, pero acá estan los cambios que habías pedido para cerrar el ticket #417 |
|
@edvm @gilgamezh Cuando este pull se mergee hay que setearle desde el admin a las empresa que son benefactoras del asoc. civil un 1 en el campo que agregamos! Asi figuran los jobs promocionados. |
edvm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En general se ve muy bien! Nomas hice algunos comments de cosas que tengo dudas y pedí algunos fixes muy menores :)
| '-company__rank', '-created')[:sponsored_size] | ||
| return sponsored_jobs | ||
|
|
||
| def non_sponsored(self, from_date, sponsored_size): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pregunta @eduzen , les parece filtrar los non_sponsored usando company__rank==0 ? como para que sea mas barata la query? :) Veo en el jobs/views.py que non_sponsored toma sponsored_size como argumento, para poder obtener la lista de, digamosle sponsored jobs. Existe una relacion entre la lista de jobs non_sponsored y sponsored_size? o es para poder llamar al queryset sponsored() y de ahi hacer el exclude(pk_in=sponsoredjobs) ? Si fuese esto ultimo, me parece es mas conveniente filtrar por company_rank=0, que opinan?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hola @edvm, creo que no podemos filtrar por company_rank == 0 solamente.
sponsored_size remite a la cantidad de trabajos sponsoreados:
Ahí en la imagen podes ver que son 2 los que puse para probar. Ahora esos dos no son quizás los únicos jobs sponsoreados que hay, entonces los que restan no son solamente los de ranking == 0.
Espero poder explicarme!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gracias por la explicación @eduzen !
| self.assertEqual(len(response.context["job_list"]), 1) | ||
| self.assertIn(sponsored_job, response.context["sponsored_jobs"]) | ||
| self.assertIn(sponsored_job2, response.context["sponsored_jobs"]) | ||
| self.assertEqual(len(response.context["sponsored_jobs"]), 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esto esta genial! @eduzen pueden agregar un test para un company con rank=0 que cree jobs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dale ahí agrego!
| </div> | ||
| {% if object.rank > 0%} | ||
| <hr/> | ||
| <p> Socia Benefactora de la <a href="https:/ac.python.org.ar">Asociación Civil Python Argentina</a></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mini typo, falta un / en el anchor tag (dice `https:/ac.python.org.ar').
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
@edvm el finde reviso los cambios sugeridos, y contesto pto por pto, igual el rank==0 pinta bien! Pero lo tengo que pensar porque quizas queden algunos afuera, algunos sponsoreados pero que no entran el top 3 que se rankean arriba. |
|
@eduzen tal como charlamos en el PyCamp, no es trivial el manejo de los "sponsored slots". |
edvm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 Muchas gracias!
* add flake8 to tests. * pep8 police * move flake8 config to .flake8 * fix pep8 args * add python3.5 and 3.6 to travis-ci * speed up tests * Add a general word-wrap style rule * Use docker image from dockerhub. Makefile with command alias * Adds gender field to EventRegistration model * Adds migration related to new gender field * Adds gender field to corresponding forms * Show the gender in registered list and CSV. * fix pep8 * Change the homepage context * Replaces Ultimas Noticias and Últmos Trabajos with a new section * Refactor the homepage as a class-based view * Added factories for testing * Added tests for the new homepage * Sanitize html inputs on Events and Jobs (#412) * fix autosuggest js on jobs form * refs #409 #410 add html_sanitizer to description field of Job and Event * refs #409 410 add tests to Job and Event views * remove duplicate requeriment * adjust code to pycodestyle * fix wrong exception class * Update job_form.html * added normalize_tags function on job utils (#418) * 407 migration to fix tags (#419) * Arreglo error de linter * Added new makemigrations shortcut * added missing migration * Adds a migration to clean the tags * split function to use ir * Use tag normalization function in migration * #346 autoslug (#420) * added autoslug fields to events * fixed url position * Fixed migrations (#423) * Resolviendo issue #383 (#425) * Resolviendo issue #383 Agregue el EMAIL_CONFIRMATION_LA_DOMAIN con el valor "python.org.ar". Probado en un servidor debug funciona correctamente el link. * arreglando error de flake8 * 417 sponsored jobs (#424) * Added rank for pycompanies, updated joblist view with sponsored jobs, added ac.civil badget to pycompanies * Changes after code review * moved css styles and other html stuff * Fixed typo and added one test with rank==0

Aca agregamos los jobs sponsoreados!