#django

/

      • mekhami
        and so far you've only told me 'that shouldn't work'
      • pembo13
        mekhami: more luck than anything, it makes an internal match
      • which isn't named, so django doesn't use it
      • fnstudio joined the channel
      • sandcurves joined the channel
      • kkuj has quit
      • mekhami: for further details, you're going to have to read up on regexp, you did not copy the examples from the docs properly however
      • mekhami
        pembo13: i see the error. I'm wondering why it worked with parens is all.
      • pembo13
        mekhami: might have worked with a single digit
      • oh sorry
      • mekhami
        it appeared to work with 10
      • pembo13
        will work with parents as it's a matching group
      • nk1 has quit
      • but it's unnecessary
      • tbaxter
        vlt: well, it would kinda depend on where the string appears.
      • vlt
        pembo13: Ok … say I have a company name that can occur in text string pulled out of the DB to be rendered in a template. Now I want to put this <span> around the company name. I’d have to put a .replace("company_name", "<span>company_name</span>") to every possible string object AND use |safe in the template.
      • tbaxter: ^
      • pembo13
        vlt: more or less, probably want to use a filter/tag for that though
      • tbaxter
        vlt: easiest thing to do (aside from doing it in JS) would be a little find/replace filter
      • dodobrain joined the channel
      • vlt
        Yes, I’m an idiot. I think custom template tags are exactly for this purpose!
      • template filters, rather
      • What’s the difference?
      • lumidify has quit
      • pembo13
        vlt: filters are more like pipes.. tags are more like small functions
      • vlt
        pembo13: Then a filter, right?
      • pembo13
        vlt: sounds best like a tag, might want to check that Django doesn't already have something you can use
      • tbaxter
        could go either way.
      • workbean has quit
      • vlt
        Ok, thanks guys!
      • lau joined the channel
      • tbaxter
        just out of curiosity, what's the span for?
      • CarlFK has quit
      • vlt
        tbaxter: Formatting the company name via CSS
      • otrenav joined the channel
      • fnstudio has quit
      • tbaxter
        formatting how, though?
      • mgeary joined the channel
      • pembo13
        tbaxter: i'm thinking like a search engine
      • highlighting search tersm
      • terms*
      • vlt
        tbaxter: span.format_me { size: ...; color: ...; letter-spacing ....}
      • mgeary
        hi folks. long time no see
      • darkxploit has quit
      • poohbear82
        What is the equivalent of manage.py syncdb --all in 1.9?
      • Ash_Crow joined the channel
      • dcrouch joined the channel
      • c17r
        manage.py migrate
      • surfnturf_ has quit
      • k3va has quit
      • streblo joined the channel
      • surfnturf_ joined the channel
      • poohbear82
        c17r, doesn't work. I keep getting relation does not exist
      • pembo13
        poohbear82: `python manage makemigrations` first
      • poohbear82
        pembo13, did that
      • tbaxter
        vlt: yeah, I'm aware of CSS :-). Depending on what you're doing though, a span may not be right.
      • pembo13
        ok, paste traceback
      • cnk has quit
      • kingarmadillo joined the channel
      • vlt
        tbaxter: Can you give an example of where a span is not right?
      • tbaxter
        vlt: that really depends on what the formatting is
      • vlt
        tbaxter: Are there HTML elements tha don’t allow <span> inside?
      • 22:17:19 vlt | tbaxter: span.format_me { size: ...; color: ...; letter-spacing ....}
      • tbaxter
        no. span is an inline element. it is allowable pretty much anywhere. It is, however, also a meaningless element.
      • CodeRobyn has quit
      • and again, I'm quite familiar with CSS, thank you.
      • AndrewMcC has quit
      • dodobrain has quit
      • But for example, if you wanted the company name bolded, then you should use <b> (not <strong>).
      • vlt
        tbaxter: I’m sorry, I didn’t mean to patronize you in any way. I’m 100% sure you’re way more familiar with CSS than I am.
      • poohbear82
      • tbaxter
        but it's really just a question of what exactly the formatting is.
      • pembo13
        poohbear82: that's a db engine error by the looks of ir
      • zivester joined the channel
      • it*
      • poohbear82
        pembo13, what does that mean?
      • vlt
        tbaxter: I repeated that example because that’s pretty much it: size, color, letter-spacing.
      • Fuyou has quit
      • tbaxter
        ah. gotcha.
      • sandcurves has left the channel
      • bjornkri has quit
      • pembo13
        poohbear82: you need to identify the query triggering that error
      • rpkilby has quit
      • solidvance has quit
      • staticshock_ joined the channel
      • poohbear82
        pembo13, all i did was add a column to the model. Is there a way to do the migrations from scratch and recreate all tables?
      • mgeary
        i’m struggling with trying to set the “initial” on an unbound form field after the form is instantiated with an initial dict. i see an “initial” property on that field instance, and i can change it, but it doesn’t affect what the form renders out. Why is that?
      • AndrewMcC joined the channel
      • pembo13
        poohbear82: you have a model named `q`?
      • poohbear82: did you run makemgirations after the addition
      • poohbear82
        I did the makemigrations, i still get the same errors
      • giarc has quit
      • barscka has quit
      • i need something similar to syncdb in the old django
      • fission6
        has anyone experience what appears to be some weird race conditions around passing object.ids to celery tasks and sometimes coming up with no mathcing query object?
      • theslow1 joined the channel
      • sam[cOe] has quit
      • sam[cOe] joined the channel
      • poohbear82
        btw, this is not my code, i inherited this nonsense lol
      • divkis01 joined the channel
      • pembo13
        poohbear82: was a migration created for your new field/column?
      • cnk joined the channel
      • darkxploit joined the channel
      • fission6: usually happens when your send the task to celery before the transaction is commited
      • tbaxter
        EvilDMP: sounded like you killed it today.
      • poohbear82
        pembo13, since then i deleted the migrations folder and droped that table from the db. hoping to do migrations from scratch, but django apparently doens't have that capability anymore or doesn't want to do it
      • sframe joined the channel
      • staticshock_ has quit
      • pembo13
        poohbear82: if you removed the migrations folder, `makemigrations` will regenerate it
      • dodobrain joined the channel
      • mekhami
        was there ever consideration to make follow=True default on the django test client
      • poohbear82
        pembo13, if it did I wouldn't be here :)
      • sandeepsihari joined the channel
      • pembo13
        poohbear82: well it's suppose to that's the whole point of it, so you need to look to see what your missing
      • theslow1
        Hey everyone. I have a Django project which is needs to work together with Ruby Spree (Solidus). Solidus has a few end-points from which I can retreive data passed as JSON.
      • tbaxter
        so you need to get that data, then do stuff with it?
      • theslow1
        Now, what I am hoping to do, is in python, to define a `Product` class, which behaves as if it was a normal Django Model
      • iraycd has quit
      • titankiller
        I am preparing something like a dashboard on django app. It does not have any model associated with it(it contains information about different models and their aggregations). Is there a generic class-based view I can use for this ?
      • FancyCamel has quit
      • sandeepsihari
        guys can you suggest me best Django tutorial to lear .. ??
      • tbaxter
        theslow1: take a look at this: https://github.com/mbylstra/django-wham
      • amcorreia
      • mattmcc
        titankiller: Probably don't even need a CBV.
      • theslow1
        tbaxter, thank you!
      • tbaxter
        titankiller: i usually do that sort of thing with a plain old empty TemplateView and a bunch of template tags
      • surfnturf_
        sandeepsihari: do the official one first. then try a few others. It took me a few before I "got it"
      • cmheisel has quit
      • mohabaks has quit
      • theslow1
        that description is exactly what I was looking to do
      • tbaxter
        sandeepsihari: definitely do the official one first. Then maybe the django-girls tutorial.
      • ardu joined the channel
      • ardu_ joined the channel
      • johnmilton has quit
      • staticshock_ joined the channel
      • sandeepsihari has quit
      • ardu_ has quit
      • ardu has quit
      • ardu joined the channel
      • T0rch joined the channel
      • cybo_
        amcorreia, you've got a recursive import. use strings instead of importing the class. "assessment.Instruments" on your FK in forms.models
      • blackcross
        Anyone have some CSS designer recommendations? I have several pages done with basic bootstrap CSS, but it can be improved dramatically with a CSS designer.
      • cmheisel joined the channel
      • amcorreia
        cybo_, i'll try, thx
      • streblo has quit
      • melhiors has quit
      • xerotic joined the channel
      • django582 joined the channel
      • deadlock has quit
      • yuriheupa joined the channel