Need a export script to work with Django and BSS ???

Anybody can help out to create script to export the Django template language at the exporting the website...

based on the following discussion.....


<div class="item" dj-for="i in items">
  <h2 dj-ref="">This is the heading</h2>
  <div dj-ref="i.content|markdown">Lorem ipsum dolor sit amet …</div>

need to converted as

{% for i in items %}
  <div class="item">
    <h2>{{ }}</h2>
    <div>{{ i.content|markdown }}</div>
{% endfor %}

I see you already asked the same thing a few times, even specifying that you want it done "as soon as possible". So I guess you're earning your pay doing websites, and I hope you're willing to share the wealth.

open a GitHub repo and post what YOU have already done. That's a good approach when just asking for a little help.

or just tell how much you're willing to pay a programmer to do everything for you.

I am just started learning Django because i am interested in develop a website for me. I am novice in both part backend and front end. So i bought BSS after seeing the clean design and the above mentioned thread telling how we can use Django in BSS.

Obviously once i figure out the way to integrate Django and BSS i will share the code in github. It will help other people.... For that purpose i am just started learning Beaustifull soup. Lets see how it will turnouts.

So i am not in a financial state to hire to somebody to do my work. If i got enough money surely contact you.

Thanks mate

How about something like this??

from bs4 import BeautifulSoup with open( "index.html" ) as fp: soup = BeautifulSoup(fp, "lxml") for div in soup.find_all(djfor=True): if div: forline = "{% for " + div.get('djfor') + " %}" div.insert_before(forline) if 'djfor'in div.attrs: del div.attrs['djfor'] div.insert_after('{% endfor %}') for ref in soup.find_all(djref=True): if 'djref' in ref.attrs: refattr = ref.get('djref') ref.string.replace_with('{{ ' + refattr + ' }}') del ref.attrs['djref'] print (soup.prettify())*

Thank you soooo much jimL, You are my savior

It is working flawlessly. I am working on it and further tweaking.

If you wish, can u contact me at my personal mail id:

Thank you

Hello good day, I like that you have found a possible solution. What I don't like very much, is when some "Member Valued" appears criticizing and judging ahead of time and writing with capital letters as screaming. Have a good day everyone. Greetings.

For anyone who is interested I have created a github repo so that we can share and expand on the code. I've added ability to create django if and block statements statements. Please raise a ticket in GitHub for future improvements. PRs welcome!

Thank you... Blingster...

Its a good job.

@gagosen : ◔̯◔

Pmsl @gagosen- there was nothing wrong with Marrcos post so not sure why you felt the need to snarky dig (much like I don’t know why I’m writing this tbh) but meh.....

I agree with Chris here too. Heck even if he was criticizing and judging, your single post here on the forums hardly gives you the right to say anything at all. You were obviously not here for the past 4 years+ reading the numerous posts asking people to do their work for them without offering compensation. Most of us here are doing this for a living as web design or development or both so why should we give it all away just because someone asks here. After 4+ years of having questions like that asked for people to do things for them instead of them learning how to do it, and for people here to do it for free, which the OP stated directly they were not paying ... I would have posted something very similar. And ... it has nothing to do with the Valued Member title, it has to do with being sick of the freeloaders getting others to do their work. Simple as that. end rant

@lightwarrior @jimL

I like to to run beautify.js instead of prettify when finishing up BSoup

Alternative to blingster repo,

Will also move created files inside a django application folder.

You should see the absurd questions in the Quora Web development forums.

"Could someone please post in HTML for how to create a review website with login and members area with location I can get free hosting."

I pass on about 20 of these dopey questions every day.

Years ago I used to do graphic design work for t-shirt printing. It was a pretty big thing, and did work for a lot of shop, so became well known in my local area as "the t-shirts artist." At least once a month, someone would come in to my office and say, "I have this great idea for a line of t-shirts I want to sell, so I need you to come up with about 10 designs that will be really popular and big sellers." I'd just sort of stare slack-jawed for a few moments and then say, "would you like me to sell them for you, too, and just give you a check every month?"