Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'master' of https://github.com/alvivi/leetelo

  • Loading branch information...
commit cb2cd329eff12e4bc101581b5e8932eb1fac68fa 2 parents 1a05eb7 + 4eb8b27
Álvaro Vilanova authored

Showing 1 changed file with 44 additions and 10 deletions. Show diff stats Hide diff stats

  1. +44 10 tools/restart_db.py
54 tools/restart_db.py
@@ -19,7 +19,7 @@
19 19 akiraBook = Book(title=u'Akira', author=u'Katsuhiro Otomo',genre=u'Novela', year=1982, image=db.Link('http://ecx.images-amazon.com/images/I/51PhfWmsbzL._SL500_AA240_.jpg')).put()
20 20 panBook = Book(title=u'Pan', author=u'Knut Hamsun',genre=u'Novela', year=2010, image=db.Link('http://ecx.images-amazon.com/images/I/41gf6VVjVcL._SL500_AA240_.jpg')).put()
21 21 jtBook = Book(title=u'Canci�n de hielo y fuego 1: Juego de tronos', author=u'George R.R. Martin',genre=u'Novela', year=1991, image=db.Link('http://ecx.images-amazon.com/images/I/21EScU0DCEL._SL500_AA240_.jpg')).put()
22   -#nansenBook = Book(title=u'Hacia el polo. Relato de la expedici�n del Fram de 1893 a 1896.', author=u'Fridtjof Nansen',genre=u'Aventuras', year=1898, image=db.Link('http:/ecx.images-amazon.com/images/I/41a79DegDuL._SS400_.jpg')).put()
  22 +nansenBook = Book(title=u'Hacia el polo. Relato de la expedici�n del Fram de 1893 a 1896.', author=u'Fridtjof Nansen',genre=u'Aventuras', year=1898, image=db.Link('http://ecx.images-amazon.com/images/I/41a79DegDuL._SS400_.jpg')).put()
23 23 vasiliBook = Book(title=u'Vida y Destino', author=u'Vasili Grossman',genre=u'Novela', year=1992, image=db.Link('http://ecx.images-amazon.com/images/I/51yjW-RGG8L._SL500_AA240_.jpg')).put()
24 24 beevorBook = Book(title=u'Berl�n. La ca�da: 1945', author=u'Anthony Beevor',genre=u'Hist�rico', year=2002, image=db.Link('http://ecx.images-amazon.com/images/I/5123tJLTXXL._SL500_AA240_.jpg')).put()
25 25 krohgBook = Book(title=u'Albertine', author=u'Christian Krohg',genre=u'Novela', year=1886, image=db.Link('http://www.gyldendal.no/var/ezwebin_site/storage/images/gyldendal/videregaaende/studieforberedende-og-fellesfag/tilleggslitteratur/albertine/401110-3-nor-NO/Albertine_productimage.jpg')).put()
@@ -40,15 +40,19 @@
40 40 deseoBook = Book(title=u'Deseo y Enga�o', author=u'Nicole Jordan',genre=u'Rom�ntico', year=2008, image=db.Link('http://ecx.images-amazon.com/images/I/51cxReM6ETL._SL500_AA240_.jpg')).put()
41 41 tokyoBook = Book(title=u'Tokyo Blues(Norwegian wood)', author=u'Haruki Murakami',genre=u'Rom�ntico', year=2007, image=db.Link('http://www.labitacoradeltigre.com/edu-images/tokio_blues.jpg')).put()
42 42 quienBook = Book(title=u'�Quien te lo ha contado?', author=u'Marian Keyes',genre=u'Rom�ntico', year=2003, image=db.Link('http://ecx.images-amazon.com/images/I/411BFxU58pL._SL500_AA240_.jpg')).put()
  43 +prisioneroBook = Book(title=u'El Prisionero del Cielo', author=u'Carlos Ruiz Zaf�n',genre=u'Novela', year=2010, image=db.Link('http://ecx.images-amazon.com/images/I/51eLBni5-IL._SL500_AA240_.jpg')).put()
  44 +imperioBook = Book(title=u'El Imperio eres t�', author=u'Javier Moro',genre=u'Novela', year=2010, image=db.Link('http://ecx.images-amazon.com/images/I/51I5FIliVKL._SL500_AA240_.jpg')).put()
  45 +arenaBook = Book(title=u'Tiempo de Arena', author=u'Inma Chac�n',genre=u'Novela', year=2011, image=db.Link('http://ecx.images-amazon.com/images/I/51yM1aYLaoL._SL500_AA240_.jpg')).put()
  46 +libertadBook = Book(title=u'Libertad', author=u'Jonathan Franzen',genre=u'Novela', year=2011, image=db.Link('http://ecx.images-amazon.com/images/I/41jYTLPzJoL._SL500_AA240_.jpg')).put()
43 47
44 48 db.delete(Copy.all().fetch(512))
45   -justinCopy1 = Copy(user=testUser, book=justinBook, offerType="Intercambio", offerState="Con solicitud",language="Frances",pages=250,edition=8,genre="Novela").put()
  49 +justinCopy1 = Copy(user=testUser, book=justinBook, offerType="Intercambio", offerState="Con solicitud",language="Frances",pages=250,edition=8).put()
46 50 mistCopy1 = Copy(user=nilsenUser, book=mistBook, offerType="Intercambio", offerState="Con solicitud",language="Frances",pages=200,edition=4,genre="Novela").put()
47 51 kafkaCopy1 = Copy(user=testUser, book=kafkaBook, offerType="Venta", offerState="Con solicitud",language="Ingles",pages=550,edition=9,genre="Novela").put()
48 52 cienCopy1 = Copy(user=nilsenUser, book=cienBook, offerType="Venta", offerState="Con solicitud",language="Frances",pages=255,edition=6,genre="Novela").put()
49 53 panCopy1 = Copy(user=testUser, book=panBook, offerType="Prestamo",offerState="Con solicitud",language="Frances",pages=220,edition=5,genre="Novela").put()
50 54 jtCopy1 = Copy(user=nilsenUser, book=jtBook, offerType="Prestamo",offerState="Con solicitud",language="Frances",pages=250,edition=1,genre="Novela").put()
51   -#nansenCopy1 = Copy(user=testUser, book=nansenBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=457,edition=8,genre="Novela").put()
  55 +nansenCopy1 = Copy(user=testUser, book=nansenBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=457,edition=8,genre="Novela").put()
52 56 vasiliCopy1 = Copy(user=testUser, book=vasiliBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=1098,edition=8,genre="Novela").put()
53 57 beevorCopy1 = Copy(user=testUser, book=beevorBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=896,edition=8,genre="Novela").put()
54 58 krohgCopy1 = Copy(user=testUser, book=krohgBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=250,edition=8,genre="Novela").put()
@@ -64,7 +68,15 @@
64 68 decadenCopy1 = Copy(user=testUser, book=decadenBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=435,edition=8,genre="Novela").put()
65 69 mesopCopy1 = Copy(user=testUser, book=mesopBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=335,edition=8,genre="Novela").put()
66 70 rivertonCopy1 = Copy(user=testUser, book=rivertonBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=457,edition=8,genre="Novela").put()
67   -
  71 +austenCopy1 = Copy(user=nilsenUser, book=austenBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=457,edition=8,genre="Novela").put()
  72 +deseoCopy1 = Copy(user=nilsenUser, book=deseoBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=457,edition=8,genre="Novela").put()
  73 +tokyoCopy1 = Copy(user=nilsenUser, book=tokyoBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=457,edition=8,genre="Novela").put()
  74 +quienCopy1 = Copy(user=nilsenUser, book=quienBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=457,edition=8,genre="Novela").put()
  75 +cieloCopy1 = Copy(user=nilsenUser, book=cieloBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=457,edition=8,genre="Novela").put()
  76 +prisioneroCopy1 = Copy(user=nilsenUser, book=prisioneroBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=457,edition=8,genre="Novela").put()
  77 +imperioCopy1 = Copy(user=nilsenUser, book=imperioBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=457,edition=8,genre="Novela").put()
  78 +arenaCopy1 = Copy(user=nilsenUser, book=arenaBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=457,edition=8,genre="Novela").put()
  79 +libertadCopy1 = Copy(user=nilsenUser, book=libertadBook, offerType="Intercambio", offerState="Con solicitud",language="Castellano",pages=457,edition=8,genre="Novela").put()
68 80
69 81 db.delete(Request.all().fetch(512))
70 82 Request(user=nilsenUser,copy=justinCopy1, state="Sin contestar").put()
@@ -79,6 +91,17 @@
79 91 Request(user=billyUser,copy=panCopy1, state="Sin contestar").put()
80 92 Request(user=lolUser,copy=panCopy1, state="Sin contestar").put()
81 93
  94 +#requests de testuser
  95 +Request(user=testUser,copy=austenCopy1, state="Sin contestar").put()
  96 +Request(user=testUser,copy=deseoCopy1, state="Sin contestar").put()
  97 +Request(user=testUser,copy=tokyoCopy1, state="Sin contestar").put()
  98 +Request(user=testUser,copy=quienCopy1, state="Sin contestar").put()
  99 +Request(user=testUser,copy=cieloCopy1, state="Sin contestar").put()
  100 +Request(user=testUser,copy=prisioneroCopy1, state="Sin contestar").put()
  101 +Request(user=testUser,copy=imperioCopy1, state="Sin contestar").put()
  102 +Request(user=testUser,copy=arenaCopy1, state="Sin contestar").put()
  103 +Request(user=testUser,copy=libertadCopy1, state="Sin contestar").put()
  104 +
82 105
83 106
84 107 db.delete(Loan.all().fetch(512))
@@ -86,11 +109,13 @@
86 109 db.delete(Sale.all().fetch(512))
87 110
88 111 db.delete(Club.all().fetch(512))
89   -club1 = Club(name=u'aficionados de Justin',description=u'Este club es una prueba', author=u'Justin Bieber'
90   -, genre= [u'Poesia',u'Ciencia Ficcion'],invitaciones = [u'user@example.com',u'lol@example.com'],state=u'Habilitado', book=justinBook,owner = testUser).put()
91   -club2 = Club(name=u'Tres metros sobre el cielo',description=u'Este club va dirigido a los fans de...', author=u'Federico Moccia', genre= [u'Poesia',u'Novela'],invitaciones = [u'nilsen@example.com',u'billy@gates.com'],state=u'Deshabilitado', book=cieloBook, owner = testUser).put()
92   -club3 = Club(name=u'fans de Haruki Murakami',description=u'Este club va dirigido a los fans de...', author=u'Haruki Murakami', genre= [u'Poesia',u'Novela'],invitaciones = [u'patriciapons89@gmail.com',u'billy@gates.com'],state=u'Habilitado', book=cieloBook, owner= testUser).put()
93   -club4 = Club(name=u'El club de la comedia',description=u'Este club va dirigido a los fans de...', author=u'Federico Moccia', genre= [u'Narrativa',u'Biograf�a'],invitaciones = [u'billy@gates.com'],state=u'Habilitado', book=cieloBook, owner = nilsenUser).put()
  112 +club1 = Club(name=u'aficionados de Justin',description=u'Este club es una prueba', author=u'Justin Bieber', genre= [u'Poesia',u'Ciencia Ficcion'],invitaciones = [u'user@example.com',u'lol@example.com'],state=u'Habilitado', book=justinBook,owner = testUser, image= db.Link('http://www.studentsoftheworld.info/sites/star/img/994_JustinBieber[1].png')).put()
  113 +club2 = Club(name=u'Tres metros sobre el cielo',description=u'Este club va dirigido a los fans de...', author=u'Federico Moccia', genre= [u'Poesia',u'Novela'],invitaciones = [u'nilsen@example.com',u'billy@gates.com'],state=u'Deshabilitado', book=cieloBook, owner = testUser, image=db.Link('http://ecx.images-amazon.com/images/I/511TxpLpVYL._SL500_AA240_.jpg')).put()
  114 +club3 = Club(name=u'fans de Haruki Murakami',description=u'Este club va dirigido a los fans de...', author=u'Haruki Murakami', genre= [u'Poesia',u'Novela'],invitaciones = [u'patriciapons89@gmail.com',u'billy@gates.com'],state=u'Habilitado', book=cieloBook, owner= testUser, image=db.Link('http://2.bp.blogspot.com/__7FN-K-p0ws/TL2YKFVWofI/AAAAAAAAAMA/MK5mIMWJc1o/s1600/hmurakami.jpg')).put()
  115 +club4 = Club(name=u'El club de la comedia',description=u'Este club va dirigido a los fans de...', author=u'Federico Moccia', genre= [u'Narrativa',u'Biograf�a'],invitaciones = [u'billy@gates.com'],state=u'Habilitado', book=cieloBook, owner = nilsenUser, image=db.Link('http://s3.amazonaws.com/kym-assets/photos/images/original/000/096/044/trollface.jpg?1296494117')).put()
  116 +club5 = Club(name=u'Fans de Knut Hamsun',description=u'Este club va dirigido a los fans de...', author=u'Knut Hamsun', genre= [u'Narrativa',u'Biograf�a'],invitaciones = [u'billy@gates.com'],state=u'Habilitado', owner = nilsenUser, image=db.Link('http://farm3.static.flickr.com/2711/4437964112_b114fa90b6.jpg')).put()
  117 +club6 = Club(name=u'Intrigados por Kafka en la Orilla',description=u'Este club va dirigido a los fans de...', author=u'Haruki Murakami', genre= [u'Narrativa',u'Biograf�a'],invitaciones = [u'billy@gates.com'],state=u'Habilitado', book=kafkaBook, owner = nilsenUser, image=db.Link('http://ecx.images-amazon.com/images/I/31oVN6Jg8RL._SL500_AA240_.jpg')).put()
  118 +club7 = Club(name=u'Adictos a la historia',description=u'Este club va dirigido a los fans de...', genre= [u'Historico',u'Biograf�a'],invitaciones = [u'billy@gates.com'],state=u'Habilitado', owner = nilsenUser, image=db.Link('http://www.satlogo.com/logo/hires/cc/canal_de_historia.png')).put()
94 119
95 120 db.delete(Club_User.all().fetch(512))
96 121 Club_User(user=testUser,club=club1,state=u'Propietario').put()
@@ -104,4 +129,13 @@
104 129 Club_User(user=billyUser,club=club3,state=u'Invitado').put()
105 130 Club_User(user=testUser,club=club4,state=u'Invitacion Aceptada').put()
106 131 Club_User(user=nilsenUser,club=club4,state='Propietario').put()
107   -Club_User(user=billyUser,club=club4,state=u'Invitado').put()
  132 +Club_User(user=billyUser,club=club4,state=u'Invitado').put()
  133 +Club_User(user=testUser,club=club5,state=u'Invitado').put()
  134 +Club_User(user=nilsenUser,club=club5,state=u'Propietario').put()
  135 +Club_User(user=billyUser,club=club5,state=u'Invitacion Aceptada').put()
  136 +Club_User(user=patryUser,club=club5,state=u'Invitacion Aceptada').put()
  137 +Club_User(user=lolUser,club=club5,state=u'Invitacion Aceptada').put()
  138 +Club_User(user=lolUser,club=club6,state=u'Propietario').put()
  139 +Club_User(user=testUser,club=club6,state=u'Invitado').put()
  140 +Club_User(user=nilsenUser,club=club7,state=u'Propietario').put()
  141 +Club_User(user=testUser,club=club7,state=u'Invitacion Aceptada').put()

0 comments on commit cb2cd32

Please sign in to comment.
Something went wrong with that request. Please try again.