These are chat archives for django/django

1st
Aug 2016
Nikita Yaschenko
@Nafanya
Aug 01 2016 00:27

Hi!
I want to create two groups to distinguish two types of users. Seems that I can create these groups programmatically like this:

different_users = Group(name='Different Users')
different_users.save()
outstanding_users = Group(name='Outstanding Users')
outstanding_users.save()

As far as I understand, these groups should be created once, so the question is where should I create them?

Looks like a function in migration perfectly fits my purposes

Antonio Carlos L. Ortiz
@antoniocarlosortiz
Aug 01 2016 05:37
@Nafanya You can create them using database migrations but you can also create them manually via the shell. It doesnt really matter what method you use as long as they get created.
iceboxx89
@iceboxx89
Aug 01 2016 06:26
Hi!
i want to build a web application & a rest-api in which the web app would be deployed on a intranet and the rest-api on a local machine, the purpose is to initiate os level commands like file transfers, building quicktime movies from images., etc..
is there a framework or a process which has already been established which i can use ?
@Nafanya why cant you use the django admin ?
mark
@thenewidealism_twitter
Aug 01 2016 07:02
@iceboxx89 are you by any chance from irc chat?
iceboxx89
@iceboxx89
Aug 01 2016 09:52
@thenewidealism_twitter yeah mark i'm..
mark
@thenewidealism_twitter
Aug 01 2016 09:52
oh… okay :)
iceboxx89
@iceboxx89
Aug 01 2016 09:52
@thenewidealism_twitter how do u know ?
mark
@thenewidealism_twitter
Aug 01 2016 09:52
you have the same nick name.
iceboxx89
@iceboxx89
Aug 01 2016 09:53
hehe.. great
mark
@thenewidealism_twitter
Aug 01 2016 09:53
you are not the one in the angular.js room ?
iceboxx89
@iceboxx89
Aug 01 2016 09:53
nope..
mark
@thenewidealism_twitter
Aug 01 2016 09:53
then probably it’s different person.
anyways.
im dealing with rest framework as well.
iceboxx89
@iceboxx89
Aug 01 2016 09:54
cool., its life changing !
mark
@thenewidealism_twitter
Aug 01 2016 09:54
do you know something about django and angularjs?
i am in need of help
:p
iceboxx89
@iceboxx89
Aug 01 2016 09:55
i might., ask away
mark
@thenewidealism_twitter
Aug 01 2016 09:55
can anyone help me figure out how to implement this tip to the already existing angular script? I'm afraid they will collide with each other.. :( https://coderwall.com/p/cl7zyg/api-calls-and-infinite-scroll-with-angularjs
so im implementing this tip.
here.
iceboxx89
@iceboxx89
Aug 01 2016 09:58
that's the front end. what about the backend code ?
mark
@thenewidealism_twitter
Aug 01 2016 09:59
infinite scrolling doesn’t really require much of a backend code
but here is my api
all i need to do is to trigger that next page button
when i reach the end of the page...
and i am not knowledgeable enough to do this
just wondering if you might know something
iceboxx89
@iceboxx89
Aug 01 2016 10:00
in the url: https://coderwall.com/p/cl7zyg/api-calls-and-infinite-scroll-with-angularjs the function FilesListCtrl does exactly that
mark
@thenewidealism_twitter
Aug 01 2016 10:01
but the probelm is that, i already have a angular js code operating in my site
and i can’t put that infinite scroll thing into the current one with optimization
iceboxx89
@iceboxx89
Aug 01 2016 10:01
looking at your api., i think u need to rename one variable in the code
$scope.next_page = data.nextPageInternal;
$scope.next_page = data.next;
iceboxx89
@iceboxx89
Aug 01 2016 10:08
@thenewidealism_twitter integration into the page is something very specific to your setup.,
mark
@thenewidealism_twitter
Aug 01 2016 10:12
okay. i guess i have to tackle this..
thanks
cburgdorfer
@cburgdorfer
Aug 01 2016 11:10
Hi, i have an opportunity for an angular/django contractor to join my team in shoreditch/london. Who's interested or knows where interested folks could be?
iceboxx89
@iceboxx89
Aug 01 2016 12:35
@cburgdorfer hi, is this a remote work kind of thing ?
Lioman
@lioman
Aug 01 2016 19:10
Has anybody a hint how I can access the URL parameters in a RedirectView
Lioman
@lioman
Aug 01 2016 19:16
never mind Ifound the solution
Nikita Yaschenko
@Nafanya
Aug 01 2016 19:23
@iceboxx89 I can use admin, but in this case I'd have to create groups each time I deploy my app, and I want a more automated solution.
Lioman
@lioman
Aug 01 2016 19:30
@Nafanya use a data migration
Nikita Yaschenko
@Nafanya
Aug 01 2016 19:38
@lioman That's exactly what I did, thx.
Long Huynh
@itslonghuynh
Aug 01 2016 20:17
django 1.10 just updated and I just started trydjango 1.9 - Will i get lost once im on my own?
Matthew Miller
@MasterKale
Aug 01 2016 21:29
hey, is there a reason my request's Origin header value is being turned into HTTP_Origin within request.META instead of HTTP_ORIGIN?
django-cors-headers won't pick up the request's Origin value because of this difference
Matthew Miller
@MasterKale
Aug 01 2016 21:54
nevermind, it was a buggy dependency issue :\