does anyone know of a web service which allows access to high resolution multi spectral satelite imaging that also offers a multitude of passes
like we used to have this thing called digital globe but i believe it's like a quarter million a year minimum so it's not exactly useful for what i need
de_dust: Django doesn't have much of an opinion. React seems to be a more popular choice these days.
mathu
well, can't find a solution better than dynamically generating classes lol
let's see if i can get this working
FunkyBob
de_dust: aurelia :)
mattmcc
mathu: Scrapy?
rkj joined the channel
de_dust has quit
mathu: What is leading you to wanting dynamically generated classes?
mathu
mattmcc: i'm not actually writing a web archiver, that was just an analogy
not_a_web_devbot has quit
FunkyBob
which reminds me... I was going to rewrite django-filem using aurelia...
mathu
mattmcc: i need a user to be able to configure new sources to query and how often to query them
mattmcc: django-cron and friends work by writing a class per job or somesuch
mattmcc
So run a generic task, say, every minute and have it determine which jobs to run based on querying some table.
mathu
mattmcc: i don't have the luxury of knowing my jobs in advance
mattmcc
job(id, name, interval, last_run)
AtomicSpark
FunkyBob: You lost me at node.js. Though maybe that's what he's looking for.
I'll have to do some jquery soon. That should be enough.
Combined2857 joined the channel
FunkyBob
AtomicSpark: eh?
jax has quit
mattmcc
mathu: I do something very close to this already, a management command that cron (not django-cron) calls every minute, which polls client sites and runs whichever importers have been enabled in their respective admins.
mathu
mattmcc: part of why i want to use a lib is because there are other scheduled tasks that i will know in advance
oEfterdal joined the channel
FunkyBob
AtomicSpark: you mean because aurelia uses node to build?
mathu
mattmcc: django-cron runs a manage.py command in regular cron, i do have to do more or less this regardless
django-cron handles the last_run bit already, provided i can make its classes
mattmcc
Well, you can continue using some existing tool for the tasks you do know.
asadjb joined the channel
mathu
having to write a job scheduler and also import a different one is kind of embarrassing haha
idk
mattmcc
But I wouldn't use it if it requires generating classes on the fly, that just seems more work than necessary.
AtomicSpark
FunkyBob: I haven't dipped my toe into node.js yet. It's whats keeping me from manually compiling things like bootstrap.
mathu
turns out it's really really easy though
FunkyBob
AtomicSpark: sure, but who'd use bootstrap? also, with Aurelia, you can pretty much forget it's node
mathu
it's just a call to `type()` and then if you want it to be scoped within some module `globals()['NewClassName'] = type(...)`
i think doing that is actually possibly less work than implementing a job queue. the reason i'm hesitant to do the dynamic class generation is that it just seems like awful practice
kuter has quit
but, well, this is basically a reverse-paid internship. if they want to be super picky about my code they can pay me for it
mattmcc
Nah, it's a feature of Python.
Django has metaclasses all over the place.
mathu
i trust Frameworks to do it more than Me
mattmcc
..And factories.
detseg has quit
FunkyBob
AtomicSpark: honestly, Aurelia sets up the whole project for you, and has the build / compile / watch+serve stuff pre-set for you
you can then get on with writing you html/js (as separate things, unlike that moronic JCX shit)
asadjb has quit
urth has quit
mathu
mmm, wait, these configurations need to persist
oh okay my studybuddy is calling it a night
maybe i'll be back to commit more sins tomorrow
peace
mattmcc
Persist in a job table, perhaps? :)
shangxiao has quit
(job_class_attrs jsonb)
urth joined the channel
encod3 joined the channel
zhalla joined the channel
Ergo joined the channel
apostal joined the channel
shangxiao joined the channel
csed joined the channel
apostal
Hello, I am using django wizard and in one of the steps I am trying to understand how can I combine two forms in one step. Modelform(etc..) and modelformset_factory(Images, form=ImageForm, extra=3)
FunkyBob
apostal: you mean FormWizard ? from the django-forms package?
apostal
FunkyBob: yes
rgenito joined the channel
shangxiao has quit
FunkyBob
hmm....I have an old site that does that, somewhere
FunkyBob: but problem I have is in class ContactWizard(SessionWizardView): def done(self, form_list, **kwargs): --------- form_list does not return encapsulated forms cleaned_data
lwm459 joined the channel
asadjb has quit
nazarewk has quit
nazarewk joined the channel
offs3tzer0 joined the channel
mad_moses
Is it wrong to upload my migrations to the productive Server? Locally I am using sqlite and on my server mysql. Sometimes I'm encountering errors because of this
hutch34 joined the channel
kezabelle joined the channel
mattmcc
Migrations are how you update your DB state, regardless of environment.
giot joined the channel
giot
test
anyone around?
FunkyBob
mad_moses: errors because you fail to commit your migrations to your repo?
giot: yes
mad_moses
FunkyBob: no, everything is uploaded. but if I run manage.py makemigrations on my server, i got new migrations which make troubles
FunkyBob
mad_moses: you _don't_ run that on your server
you just run "manage.py migrate"
to _apply_ them
you already made them in development,
mattmcc
Although if running makemigrations on the server causes problems, that suggests a whole other issue.
FunkyBob
how can you have new migrations...?
indeed, it does
mattmcc
It should really be a no-op.
If it creates migrations, that means your models and migrations aren't in sync.
FunkyBob
which means your server isn't using the same code you have in dev
mad_moses
FunkyBob: okay thank you, I will have a look at this
hutch34 has quit
FunkyBob
so... who has been making changes in production, mad_moses ? :)
mad_moses
FunkyBob: no one, not understanding what is happening
FunkyBob
how do you transfer your code to the server?
mad_moses
FunkyBob: git
FunkyBob
and what does "git status" show on the server?
Ahuj joined the channel
mad_moses
git status
# On branch master
nothing to commit (working directory clean)
ups
git pull => already up-to-date
FunkyBob
so, something on your dev machine wasn't committed... or someone forgot to run makemigrations there
which would suggest your tests are insufficient :)
bradfordli123 has quit
vanheckcz joined the channel
bradfordli123 joined the channel
phlax has quit
ThisIsJack joined the channel
giot
Hi folks, I'm stuck trying to understand why I can't query the model with a datetime object. I need to convert a timestamp str (in Unix time) to a datetime obj, and use it to find entries newer then what's in the datetime obj. I sort of successfully achieve the conversion from timestamp to obj, but can't use the object agains a DateTime field in the model. Here's a very simple example from ipython. Why do I get nothing at line Out[10], while using anot
FunkyBob: you are right, manage.py is not using my virtualenv. How do you activate your virtualenv within your manage.py. I did someting like this in the past: git status
# On branch master
nothing to commit (working directory clean)
FunkyBob
mad_moses: you don't
mad_moses
ups ... i mean this: sys.path.insert(0, '/var/www/mars425/files/scripts/python_productive_env/local/lib/python2.7/site-packages')
FunkyBob
yeah... no...
why not just activate your virtualenv?
mad_moses
FunkyBob: so how do you tell your manage.py to use a specific virtualenv
FunkyBob
or specify tyhe python in the virtualenv?
you DON'T tel manage.py to use it
it uses whatever python it finds
bradfordli123 has quit
mad_moses
FunkyBob: because then i need to do one more step :) and I could forgett to activeate my viertual env
FunkyBob
how do you run your django in production?
mattmcc
Use django-admin, which has the virtualenv's Python binary hardcoded.
FunkyBob
mad_moses: if you can even run your django project without virtualenv active, you've done something very wrong
I mean, it's not like you installed Django globally, right?