IRC log of #novawebdev for Thursday, 2018-05-24

*** lelkneralfaro has joined #novawebdev04:04
*** lelkneralfaro_ has joined #novawebdev06:01
*** lelkneralfaro_ has joined #novawebdev06:56
*** mjsir911 has joined #novawebdev08:38
*** mjsir911 has joined #novawebdev09:04
*** mjsir911 has joined #novawebdev09:41
*** replaceafill has joined #novawebdev09:56
*** mjsir911 has joined #novawebdev10:37
*** mjsir911 has joined #novawebdev10:49
*** jelkner has joined #novawebdev10:54
jelknerGood morning, replaceafill!10:55
replaceafillgood morning jelkner!10:55
*** Dany has joined #novawebdev10:56
jelknerDany is here talking about the next major user stories for NOVALACIRO10:57
jelknerdrum roll please....10:57
jelknermailing lists!10:57
jelknershe needs to be able to send emails to our members10:57
jelknerfrom our system10:57
replaceafilljelkner, makes sense10:58
replaceafilljelkner, i could probably work on that next week10:58
Danyreplaceafill, do you want I make that as a issue in gitlab?10:59
jelkneri told her that we knew community groups were going to want that10:59
replaceafillDany, please10:59
Danyreplaceafill, ok11:00
jelknerwe have an event on june 9th11:00
jelknerwe need to contact members for that11:00
jelknerso i would say weekend of june 2 and 3 is good goal for using / testing11:01
jelkneris that possible?11:01
replaceafilljelkner, i think so11:01
jelknercool11:01
jelknerlet's shoot for that11:01
jelknercool, she just came up with another user story11:02
jelknertexting!11:02
jelknerwe knew that was coming too11:02
Danyreplaceafill, I'll like to send the invitation by text but all at the same time11:02
replaceafilljelkner, Dany that'll require some research11:02
jelknerthis is the kind of thing nvm and twu will want as well11:02
replaceafilljelkner, Dany about which SMS gateway to use11:02
jelkner+111:02
jelknerwhen we can deliver these things11:03
jelknerwe will have customers lining up at our door11:03
replaceafilljelkner, Dany this is what i see many developers use: https://www.twilio.com/sms11:03
replaceafilljelkner, Dany i have never used it :)11:03
replaceafilljelkner, Dany but we did some SMS handling with SchoolTool11:04
replaceafilljelkner, Dany so i'm familiar with the process11:04
jelknerwell, replaceafill, learning new things if fun, right? ;-)11:04
replaceafilljelkner, :D11:04
replaceafilljelkner, indeed11:04
Danyreplaceafill, ok i just summit the issue 11:10
replaceafillDany, hhmm11:12
*** lelkneralfaro has joined #novawebdev11:12
replaceafillDany, 4) is not possible in our current setup11:12
replaceafillDany, we use mailing list software11:12
replaceafillDany, an address is set like members@novalaciro.org11:13
replaceafillDany, then anyone within the mailing list can send emails to that address11:13
replaceafillDany, and that email is spread among the members11:14
replaceafillDany, and you already have 1) right?11:16
replaceafillDany, i mean, with each profile in Tendenci11:16
replaceafillDany, for 2) i'd recommend either having a single mailing list and writing your emails in both languages11:18
replaceafillDany, i've seen emails in canadian mailing lists written in english and french11:18
replaceafillDany, or having 3!!! mailing lists members, members-es, members-en11:19
replaceafillDany, that would be an administration nightmare though11:20
replaceafilljelkner, does this make sense ^?11:21
Danyreplaceafill, well I like the idea to send the email in both language, in that way people can feel more conect even when they don't share the same languages. Also most of the hispanic in the organization are try to learn english ant it could help11:24
replaceafillDany, cool11:24
replaceafillDany, for 4) maybe you could include some your email in the footers11:26
replaceafillDany, i mean if you want the member to contact you directly11:26
Danyreplaceafill, what do you mean?11:26
replaceafillDany, and not the mailing list11:26
Danyreplaceafill, that will be great11:26
replaceafillDany, so i'll reserve some time next week to set this up11:29
*** mjsir911 has joined #novawebdev11:35
Danyreplaceafill, thanks11:40
replaceafillDany, aún no has creado páginas en Tendenci?11:46
Danyreplaceafill, cual pagina?11:54
replaceafillDany, páginas en general11:54
replaceafillDany, como administradora podés crear y modificar páginas11:54
replaceafillDany, dentro de Tendenci11:54
Danyreplaceafill, oh oh ya recuerdo11:54
replaceafillDany, :)11:55
replaceafillDany, la historia sobre la pestaña y las biografías del staff11:55
Danyreplaceafill, Si lo he hecho, lo hice con un calendario https://novalaciro.org/events/month/11:55
replaceafillDany, la podés hacer con esas funciones11:55
replaceafillDany, ajá, algo así :)11:55
Danyreplaceafill, lo que no se es como crear la pagina de "quienes somos" 11:55
replaceafillDany, le reasigné el issue a Edzon, te podrías poner de acuerdo con él para que te explique como se hace?11:56
replaceafillDany, pero básicamente vos tenés la capacidad de cambiar todo el contenido del sitio11:57
replaceafillDany, es decir, los administradores11:57
Danyreplaceafill, ohhh ok 11:57
replaceafillDany, y recordá que tenemos un sitio de prueba para experimentar con dichas cosas11:58
replaceafillDany, el mismo que usamos para probar las IDs11:58
replaceafillDany, https://novalaciro.novawebdevelopment.org/11:58
replaceafillDany, allí podés destruir lo que querás :D11:58
*** mr_german has joined #novawebdev12:02
mr_germanhello, good morning replaceafill, jelkner, lelkneralfaro 12:02
replaceafillmr_german, good morning12:03
replaceafillmr_german, ready to roll?12:03
replaceafillmr_german, ?12:05
mr_germanreplaceafill, yes, but, I need your help with "recent posts"12:06
mr_germanreplaceafill, or how to put them in the homepage12:06
replaceafillmr_german, that's why we are meeting...12:06
replaceafillmr_german, hang out?12:06
mr_germansure12:06
replaceafillmr_german, hold on12:08
lelkneralfaromr_german, good morning12:10
*** dsmall has joined #novawebdev12:19
replaceafillmr_german, https://github.com/tendenci/tendenci/blob/master/tendenci/apps/pages/templatetags/page_tags.py#L49-L9912:26
dsmallreplaceafill, Good morning12:29
replaceafilldsmall, good morning12:36
replaceafillmr_german, https://github.com/tendenci/tendenci/blob/master/tendenci/apps/perms/models.py12:36
replaceafillmr_german, https://github.com/tendenci/tendenci/blob/master/tendenci/apps/pages/models.py12:36
dsmallreplaceafill, Check out my recent commit https://gitlab.com/duncan-small/Tendenci-Blog12:37
replaceafilldsmall, sorry i was in a meeting12:53
dsmallreplaceafill, np12:53
replaceafilldsmall, ah, that's the beginning of the blog app12:55
replaceafilldsmall, cool12:55
dsmallreplaceafill, yup, super basic stuff for now12:55
replaceafilldsmall, what's next? iterating over pages?12:55
dsmallreplaceafill, I was going to display post titles that would link to the blog page12:56
replaceafilldsmall, ok12:56
replaceafilldsmall, check this template tag: https://github.com/tendenci/tendenci/blob/master/tendenci/apps/pages/templatetags/page_tags.py#L49-L9912:56
replaceafilldsmall, you have an example there12:57
dsmallreplaceafill, perfect!12:57
replaceafilldsmall, that list_pages tag will get you all the pages12:57
replaceafilldsmall, and allow you to filter some12:57
replaceafilldsmall, in this case you can filter by tag12:58
dsmallreplaceafill, that will be very helpful12:58
replaceafilldsmall, so if you create several pages and assign them the same tag, say, 'post'12:58
replaceafilldsmall, you could write {% list_pages as pages_list limit=10 tags="post" %}12:58
replaceafilldsmall, and that would get you the "latest" 10 pages with that tag12:58
replaceafilldsmall, ready to be iterated over12:59
replaceafilldsmall, the tag gives you Page model objects back12:59
replaceafilldsmall, so you have access to any attribute, like title in the example12:59
dsmallreplaceafill, cool, I kinda have that already in my index.html file12:59
dsmallreplaceafill, but simplified12:59
replaceafilldsmall, correct, you just need to include the page tags like13:00
replaceafill{% load page_tags %}13:00
replaceafilldsmall, at the top of your template13:00
dsmallreplaceafill, okay cool13:00
replaceafilldsmall, any questions?13:01
dsmallreplaceafill, not right now13:01
replaceafilldsmall, cool, i'll let you go back to it then13:01
dsmallreplaceafill, i'll keep you updated13:01
replaceafilldsmall, thanks13:01
*** mjsir911 has joined #novawebdev13:14
*** Dany has joined #novawebdev13:17
dsmallreplaceafill, I have the /blog/ page displaying all pages that have the tag 'test' (and are public)13:59
replaceafilldsmall, excellent14:00
dsmallreplaceafill, by displaying I mean it prints the page title14:01
replaceafilldsmall, sure14:01
dsmallreplaceafill, I haven't worked out templates yet14:01
replaceafilldsmall, try something like this for each page: <p>{{ page.update_dt|date:"F j, Y - P" }}</p>14:02
replaceafilldsmall, so you can see template filters in action14:03
replaceafilldsmall, the filter is the |... part14:03
dsmallreplaceafill, how do I get the page to use my index.html file?14:03
dsmallreplaceafill, okay14:03
replaceafilldsmall, the page?14:03
dsmallreplaceafill, how do I get index.html to be used in my view14:04
replaceafilldsmall, could you push your code to see where you are?14:04
dsmallreplaceafill, I have14:04
replaceafilldsmall, checking14:04
replaceafilldsmall, oh, you're filtering in python14:05
replaceafilldsmall, ok14:05
dsmallreplaceafill, ya for now14:05
replaceafilldsmall, instead of returning an httpresponse14:05
replaceafilldsmall, return render(request, 'blog/index.html', {'pages_list': pages_list})14:06
replaceafilldsmall, not sure if i got render's signature right :)14:06
dsmallreplaceafill, Alright I'll mess around with that14:07
replaceafilldsmall, https://docs.djangoproject.com/en/1.8/topics/http/shortcuts/14:07
replaceafilldsmall, you'll need to adjust your template since you're doing the filtering in python and passing that already to the template14:07
replaceafilldsmall, you don't need the template filter anymore14:08
replaceafilldsmall, sorry14:08
dsmallreplaceafill, np14:08
replaceafilldsmall, i meant you don't need the template tag14:08
replaceafilldsmall, the 'list_pages' tag14:08
dsmallreplaceafill, ok14:09
mr_germanreplaceafill, take a look https://i.imgur.com/banIyUZ.png14:32
replaceafillmr_german, looks good, you should limit it to 314:33
mr_germanreplaceafill, ok14:33
replaceafillmr_german, in case titles are really long14:33
DanyHello World!15:07
*** ChanServ has joined #novawebdev15:12
dsmallclear15:18
*** ChanServ has joined #novawebdev15:30
dsmallreplaceafill, I have made some more progress15:32
replaceafilldsmall, checking15:34
replaceafilldsmall, i don't think this will be necessary: <a href = '/blog/{{ page.guid }}/' >15:35
dsmallreplaceafill, Okay15:35
replaceafilldsmall, i mean you can just send the user to the page, right?15:36
dsmallreplaceafill, right15:36
dsmallreplaceafill, I wasn't sure how much we wanted to move away from the pages15:36
replaceafilldsmall, sure15:37
dsmallreplaceafill, I can change it to send it to the corresponding page15:37
replaceafilldsmall, +115:37
replaceafilldsmall, what's your idea here: r'^blog/(?P<post_guid>\w{8}-\w{4}-\w{4}-\w{4}-\w{12})/$'15:39
dsmallreplaceafill, that was the regex to catch the post_guid15:39
dsmallreplaceafill, but it will be removed along with <a href = '/blog/{{ page.guid }}/' >15:40
replaceafilldsmall, any reason for not using the page.pk?15:41
dsmallreplaceafill, I don't know how to/ what that is15:41
replaceafilldsmall, ah ok15:41
replaceafilldsmall, <object>.pk is the primary key for a model object15:42
dsmallreplaceafill, ohhh15:42
replaceafilldsmall, you know about databases, right?15:42
dsmallreplaceafill, that would be very helpful15:42
dsmallreplaceafill, yes15:42
replaceafilldsmall, ok15:42
dsmallreplaceafill, i am pretty comfortable with SQL15:42
replaceafilldsmall, yes, usually *.pk is the way to refer to objects uniquely15:42
replaceafilldsmall, ah good15:42
dsmallreplaceafill, right15:42
replaceafilldsmall, and there are alternatives to get an objects url15:43
replaceafilldsmall, like https://github.com/tendenci/tendenci/blob/master/tendenci/apps/pages/templates/pages/search-result.html#L715:43
dsmallreplaceafill, oh wow, that is easy15:44
replaceafilldsmall, thank you framework! :)15:44
replaceafilldsmall, sometimes the pk is useful for calling views on the objects15:45
replaceafilldsmall, see https://github.com/tendenci/tendenci/blob/265aac5e5d52554968810388c5ff9c47a65e4d03/tendenci/templates/feeds/file_description.html#L215:45
replaceafilldsmall, {% url 'view_name_goes_here' arg1 arg2 argn %}15:46
replaceafilldsmall, allows you to calculate urls15:46
dsmallreplaceafill, thats super cool15:46
replaceafilldsmall, the 'view_name_goes_here' usually matches the name='...' argument you used in your urls.py module15:46
dsmallreplaceafill, right15:46
replaceafilldsmall, so you could do {% url 'blog.blogContent' page.guid %}15:47
replaceafilldsmall, and have the url generated automatically15:47
replaceafilldsmall, to match your pattern15:47
dsmallreplaceafill, right now I have: <a href = "{{ page.get_absolute_url }}" >15:48
replaceafilldsmall, that would work15:48
dsmallreplaceafill, so it sends it to the actual page15:48
replaceafilldsmall, right15:49
dsmallreplaceafill, that way I don't need to make a new view15:49
replaceafilldsmall, correct15:49
replaceafilldsmall, i personally don't mind if the urls don't follow standard blog conventions like using /year/month/slug15:50
replaceafilldsmall, it's not necessary for the first version15:50
dsmallreplaceafill, Ok cool15:50
replaceafilldsmall, what we want is a single page, /blog15:50
replaceafilldsmall, that displays pages with some criteria15:50
replaceafilldsmall, like the tag == 'post'15:51
dsmallreplaceafill, right15:51
replaceafilldsmall, or categories + subcategory15:51
replaceafilldsmall, did you check the blog.tendenci.com example?15:51
replaceafilldsmall, i mean the sidebar there15:51
dsmallreplaceafill, I am looking a it right now15:52
replaceafilldsmall, that's wordpress btw15:52
replaceafilldsmall, so Recently15:52
replaceafilldsmall, does some slicing like what you do15:52
replaceafilldsmall, latest 5 or something15:52
replaceafilldsmall, Tendenci Help and Twitter are irrelevant15:52
dsmallreplaceafill, right15:52
replaceafilldsmall, then CATEGORIES15:53
replaceafilldsmall, we'll want that15:53
dsmallreplaceafill, I can easily implement categories15:53
replaceafilldsmall, i love the "easily" part :D15:53
dsmall:)15:53
replaceafilldsmall, never use it in front of users....15:53
replaceafilldsmall, or customers15:53
dsmallreplaceafill, of course15:53
replaceafilldsmall, :D15:53
replaceafilldsmall, then FROM THE ARCHIVES15:53
replaceafilldsmall, the dropdown is kind of nice15:54
replaceafilldsmall, i usually see years first15:54
replaceafilldsmall, as links15:54
replaceafilldsmall, then drilled down until the current month15:54
dsmallreplaceafill, ya15:54
replaceafilldsmall, and ability to go to other months in the same year or differnt years15:54
replaceafilldsmall, that's your call15:54
replaceafilldsmall, how you want to do that15:54
replaceafilldsmall, but all of that logic comes from the created_dt attribute15:55
replaceafilldsmall, in the page model15:55
dsmallreplaceafill, It will probably come down to how tendenci formatted the date originally 15:55
replaceafilldsmall, what do you mean?15:55
dsmallreplaceafill, I will organize the archive based on the format of the created_dt var15:56
replaceafilldsmall, well there's also update_dt15:57
replaceafilldsmall, oh sorry i meant create_dt before15:57
dsmallreplaceafill, me too, oops15:57
replaceafilldsmall, so you could do it based on last update too15:57
dsmallreplaceafill, yup15:57
replaceafilldsmall, so if you click on a category in the tendenci blog you get to: https://blog.tendenci.com/category/facebook/15:58
replaceafilldsmall, i don't think tendenci has that yet15:58
dsmallreplaceafill, what do you mean?15:59
replaceafilldsmall, you can't go to /pages/search and filter by category15:59
replaceafilldsmall, and the current template tags like list_pages only allow you to use tags16:00
dsmallreplaceafill, if you put categories:<example> into the search bar you can16:00
replaceafilldsmall, ah i thought that was only possible for tags too16:00
dsmallreplaceafill, it is category:<example>16:01
dsmallreplaceafill, not categories, my bad16:02
replaceafilldsmall, ah16:02
replaceafilldsmall, nice16:02
replaceafilldsmall, so that's done too :)16:02
replaceafilldsmall, you just list the categories and send people to /pages/search with the right query16:03
dsmallreplaceafill, Yup16:03
replaceafilldsmall, you're all set for glory!16:03
replaceafill:D16:03
replaceafilldsmall, then you want to do some pagination, make it look pretty, etc16:03
replaceafilldsmall, but we only need basic at this point16:03
dsmallreplaceafill, right, I have been aiming for functionality instead of looks16:04
replaceafilldsmall, sure, until jelkner looks at it ;)16:04
replaceafilldsmall, then he'll give you the "it's all about how it looks" speech16:04
dsmallreplaceafill, haha yes16:05
replaceafilldsmall, https://blog.tendenci.com/2018/04/16:05
replaceafilldsmall, by month16:05
*** hrodriguez has joined #novawebdev16:05
replaceafilldsmall, maybe /pages/search can be extended to understand year + month16:05
replaceafill+ day16:05
jelknerGood afternoon, hrodriguez 16:06
hrodriguezHello! jelkner16:06
dsmallreplaceafill, possibly16:07
dsmallreplaceafill, i can take a look at it16:07
replaceafilldsmall, the pages.search view doesn't look that complicated16:07
replaceafilldsmall, sure16:07
dsmallreplaceafill, perfect16:07
replaceafilldsmall, you'll need to read this: https://docs.djangoproject.com/en/1.8/topics/db/queries/#complex-lookups-with-q-objects16:08
replaceafilldsmall, to make smarter filter(...) calls16:08
replaceafilldsmall, by default filter(...) calls do AND operations16:09
replaceafilldsmall, filter(attr='a', attr2='b')16:09
replaceafilldsmall, Q objects allow you to do OR operations16:09
dsmallreplaceafill, cool16:09
replaceafilldsmall, ok, i'll let you go back to it16:09
DanyHello World!16:10
dsmallreplaceafill, alright, I'll let you know when I make some more progress16:10
replaceafilldsmall, cool16:10
replaceafillDany, you sound a lot like zOnny :D16:10
Danyhey replaceafill 16:12
*** zOnny has joined #novawebdev16:14
dsmallreplaceafill, quick question16:37
replaceafilldsmall, yes?16:38
dsmallreplaceafill, how would I send another list like pages_list in my render call?16:38
replaceafilldsmall, the third argument in render(...) is a dictionary16:39
replaceafilldsmall, you can extend it as you need16:39
replaceafilldsmall, those "keys" will be available to the template16:39
*** nrcerna has joined #novawebdev16:39
replaceafilldsmall, so i could send {'foo': 1, 'bar': 2, 'baz': 3}16:39
replaceafilldsmall, and use 'foo', 'bar' and 'baz' in the template as variables with those values16:40
replaceafilldsmall, like {% url 'someview' baz %}16:40
dsmallreplaceafill, so like { 'categories_list': categories_list, 'pages_list':pages_list}16:40
replaceafilldsmall, correct16:40
dsmallreplaceafill, cool16:40
replaceafilldsmall, you don't need to name them _list ;)16:40
nrcernareplaceafill: Descubrí como entrant desde el cel jaja16:41
dsmallreplaceafill, right, its just how I have them set up already16:41
replaceafilldsmall, sure16:41
replaceafillnrcerna, eeehhh!!!16:41
nrcernaJajaja,por fin!16:41
mr_germanreplaceafill, see you tomorrow!!16:59
replaceafillmr_german, see you16:59
*** lelkneralfaro has joined #novawebdev17:41
dsmallreplaceafill, I am stuck17:55
replaceafilldsmall, what's up?17:56
dsmallreplaceafill, I want to display page.content under the page.title on the /blog/ landing page, but page.content is in html not plain text (it has <p> tags around it)17:56
replaceafilldsmall, correct17:57
dsmallreplaceafill, whats the best way to get just the plain text?17:58
replaceafilldsmall, you can't it's an html field17:58
dsmallreplaceafill, oh ok17:58
replaceafilldsmall, look at this: https://github.com/tendenci/tendenci/blob/master/tendenci/apps/pages/templates/pages/view.html#L47-L4917:59
replaceafilldsmall, that's the template that gets rendered when you "call" a page17:59
replaceafilldsmall, you need the |safe filter17:59
replaceafilldsmall, and then just print {{ }} the output18:00
dsmallreplaceafill, ohhh okay, so print {{ page.content|safe }} ?18:00
replaceafilldsmall, i also recommend you to see how /pages/search renders each piece: https://github.com/tendenci/tendenci/blob/master/tendenci/apps/pages/templates/pages/search-result.html#L19-L2118:01
replaceafilldsmall, |striptags is the filter to do something similar to "get plain text"18:01
dsmallreplaceafill, that makes sense18:01
replaceafilldsmall, but it's not quite as getting plain text18:01
replaceafilldsmall, try them out :)18:01
replaceafilldsmall, oh and |truncatewords may be useful to you too18:01
dsmallreplaceafill, Will do18:02
replaceafilldsmall, django has a ton of nice filters https://docs.djangoproject.com/en/1.8/ref/templates/builtins/#built-in-filter-reference18:02
dsmallreplaceafill, There are a lot of helpful ones, like date()18:04
replaceafilldsmall, +118:06
dsmallreplaceafill, I have the categories up and content under the title, as well as large headers above each list18:20
replaceafilldsmall, excellent!18:20
replaceafilldsmall, screenshot?18:21
dsmallreplaceafill, sure give me one second18:21
dsmallreplaceafill, here: http://i.imgur.com/edaCzvF.png18:22
replaceafilldsmall, nice18:22
replaceafilldsmall, don't worry about any styling until you're ready to integrate with the ORA theme18:23
replaceafilldsmall, we want just bare bones html for now18:23
dsmallreplaceafill, should I get rid of the styling?18:23
replaceafilldsmall, no, just don't add too much18:24
dsmallreplaceafill, okay18:24
replaceafilldsmall, you'll use most of our theme + bootstrap css to style18:24
dsmallreplaceafill, ok18:25
dsmallreplaceafill, whats the next step?18:30
replaceafilldsmall, filtering by dates?18:30
replaceafilldsmall, you could also start integrating into the theme if you prefer18:31
dsmallreplaceafill, do you want it to be done automatically or by input from the user?18:31
replaceafilldsmall, let's start the way blog.tendenci.com does it18:31
replaceafilldsmall, by month18:31
replaceafilldsmall, through a dropdown18:32
replaceafilldsmall, have you tried subcategories yet?18:32
dsmallreplaceafill, Alright i'll get started18:32
dsmallreplaceafill, no, but I think it would be just as easy as categories18:32
dsmallreplaceafill, I havent looked into it18:33
replaceafilldsmall, ok, np18:33
replaceafilldsmall, categories is fine for now18:33
dsmallreplaceafill, Ok18:33
*** lelkneralfaro has joined #novawebdev18:48
replaceafillACTION signs off for the day19:45
jelknerACTION signs off for the night20:42
*** mjsir911 has joined #novawebdev22:11

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!