Git Product home page Git Product logo

Comments (9)

davidhalter avatar davidhalter commented on September 18, 2024

I'm currently trying to fix many renaming bugs. I still need a few days.

I didn't really advertise renaming yet (I probably shouldn't even mention it). But I'm on it.

from jedi-vim.

davidhalter avatar davidhalter commented on September 18, 2024

Can you please post the code here? I'm too lazy to retype it! :-)

from jedi-vim.

gordio avatar gordio commented on September 18, 2024
@app.route('/article/<slug>/edit/', methods=['GET', 'POST'])
def article_edit(slug):
    """ Render edit article form by <slug> or update data from `POST` """
    from forms import ArticleForm
    from models import Article, Tag, db

    form = ArticleForm()
    article = Article.by_slug(slug=slug).first_or_404()

    if request.method <> 'POST':
        # init form data from object
        form.title.data = article.title
        form.slug.data = article.slug
        form.content.data = article.content
        # FIXME: HOW?
        tags = [t.title for t in article.tags]
        for t in tags:
            form.tags.data += ", " + tags.title
        form.pub_date.data = article.pub_date
        form.upd_date.data = article.upd_date
    else:
        if form.validate():
            article.title = form.title.data
            article.slug = form.slug.data
            article.content = form.content.data
            #FIXME
            article.tags = []
            article.pub_date = datetime.strptime(form.pub_date.data, '%Y-%m-%d %H:%M:%S')

            article.upd_date = datetime.strptime(form.upd_date.data, '%Y-%m-%d %H:%M:%S')

            tags = []
            tags_raw = form.tags.data.split(',')
            for t in tags_raw:
                t = t.strip()
                try:
                    tags += [Tag.query.filter(title==t)[0]]
                except Exception, e:
                    tags += [Tag(t)]

            db.session.commit()

            flash("Updated. Sucessfull update article.", 'success')
            return redirect(url_for('article_view', slug=form.slug.data))

    return render_template('article/edit.html', **locals())

from jedi-vim.

davidhalter avatar davidhalter commented on September 18, 2024

I probably fixed it, can you try again? (don't use the pip version)

from jedi-vim.

gordio avatar gordio commented on September 18, 2024

All fine, thx :D

from jedi-vim.

davidhalter avatar davidhalter commented on September 18, 2024

If you find anything else, let me know! I'm currently trying to improve the renaming experience.

from jedi-vim.

dbrgn avatar dbrgn commented on September 18, 2024
x = 3
if 2 == 3:
    x = 4
elif 3 == 4:
    y = x
    y = 5
else:
    del x

print x

If renaming x on line 10, it works. But if renaming it on line 1, the assignment on line 3 is not changed. Is that on purpose? I don't think the if statement creates its own scope.

(Sorry, can't reopen this ticket)

from jedi-vim.

davidhalter avatar davidhalter commented on September 18, 2024

Which version are you using? For me all variables are being changed (and this is an implementation detail at the moment). It's not intentional. I'm not sure if that's good or bad.

from jedi-vim.

dbrgn avatar dbrgn commented on September 18, 2024

You're right, sorry. I was using davidhalter/jedi@b3c89ef because vundle didn't update the submodule to HEAD (it uses the commited submodule commit id instead)...

Current master fixes issue above.

from jedi-vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.