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
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 .. ??
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.