i'm using pytz, and i have a timezone-aware datetime pulled from the database. but i'm printing this time onto a pdf, rather than rendering it with a template. if i print it as is, i get something like 2016-12-28 05:08:49.517000+00:00
i have a string containing the timezone i want to use. how do i combine "Canada/Eastern" and 2016-12-28 05:08:49.517000+00:00 to get 2016-12-28 01:08:49.517000-04:00
jas02 joined the channel
bkxd joined the channel
Leeds joined the channel
READ10 is now known as READ10|away
joyceg has quit
StvnW has quit
Taikibansei joined the channel
jessamynsmith has quit
jessamynsmith joined the channel
bkxd has quit
bkxd joined the channel
anth0ny joined the channel
sandwichheat joined the channel
Troy1 joined the channel
anth0ny has quit
Troy1 has quit
woltman joined the channel
epalm has quit
minot joined the channel
gugah joined the channel
raijin has quit
netheranthem has quit
OskrGrme has quit
dardevelin joined the channel
StvnW joined the channel
dardevelin_ has quit
newdimension joined the channel
CAPITANOOO joined the channel
StvnW has quit
CAPITANOOO has quit
jas02 joined the channel
Ryanar has quit
miz- has quit
blag joined the channel
blag
is there a good way to test logic in an AppConfig ready() function?
Technodrome joined the channel
jessamynsmith has quit
jessamyn_ joined the channel
maks25 joined the channel
jessamyn_ has quit
jessamynsmith joined the channel
jessamynsmith has quit
jessamyn_ joined the channel
sandwichheat has quit
Taikibansei has quit
Troy1 joined the channel
kupi has quit
StvnW joined the channel
eroussel joined the channel
Troy1 has quit
jessamyn_ has quit
jessamynsmith joined the channel
newdimension has quit
Debnet has quit
sol1x has quit
jessamynsmith has quit
jessamynsmith joined the channel
jessamynsmith has quit
jessamyn_ joined the channel
briannie joined the channel
mcspud
blag what does the logic look like? What are you trying to do in it?
blag
I’m trying to check that a gpg key exists
anth0ny joined the channel
mcspud
where are you checking for it?
DB?
env?
newdimension joined the channel
gugah has quit
Technodrome has quit
nethop has quit
jessamyn_ has quit
jessamynsmith joined the channel
Technodrome joined the channel
nethop joined the channel
jessamynsmith has quit
jessamyn_ joined the channel
anth0ny has quit
ellmetha has quit
shredding joined the channel
jessamyn_ has quit
shredding has quit
jessamynsmith joined the channel
Technodrome has quit
raijin joined the channel
Technodrome joined the channel
jas02 joined the channel
jessamynsmith has quit
jessamyn_ joined the channel
jessamyn_ has quit
jessamynsmith joined the channel
Troy1 joined the channel
lazybear joined the channel
maks25 has quit
rajrsohi joined the channel
Troy1 has quit
woltman has quit
aossama has quit
rajrsohi
I was trying to paginate course list view but not able to do it. I tried puting paginated_by in views and this http://dpaste.de/7Mea code in template but it seems like it does work that way and I am missing something. This is views.py http://dpaste.de/PHtZ this is related template http://dpaste.de/jk5k It looks like I am clueless about how to paginate. I would appeariciate any ahel. Thanks
adwin_ has quit
Fuyou
rajrsohi, ugh, that view looks pretty bad
not to mention it doesn't have any pagination, why are you using (TemplateResponseMixin, View) ?
rajrsohi
@Fuyou actauaally I am follwoing pack publishing's book "django by example" and this view is there. This is the exact code from book, I was trying to paginate but could not so I removed that code
Fuyou
rajrsohi, I may be not understanding something. but it seems to me more like "django by bad example" :/
jessamynsmith has quit
jessamyn_ joined the channel
e.g. there is TemplateView that already inherits from those. But since if you want list of objects, there is ListView for it
And extending get() method is not usually a good scheme for CBV. I did it first time I started using those and still struggle to rebuild that project
Subv has quit
bestafubana joined the channel
rajrsohi
Fuyou :/ List view I can paginate by paginate_by = number and puting pagination in template but in this example I am not geting any clue. So shall I go my own code and use list view rather than usogn TemplateResponseMixin