These are chat archives for django/django

11th
Jun 2017
Erick Delfin
@Nifled
Jun 11 2017 00:36
How would I go about in creating my own project template? So that I could just
startproject project_name --template=blablabla
Kyle Mulka
@mulka
Jun 11 2017 00:55
You can also make your own management command and do whatever you want
Erick Delfin
@Nifled
Jun 11 2017 01:29
@mulka Great, that was similar to what I wanted, but the second link led me directly to what I did want to do. Thank you!
Miracle Ayodele
@iammiracle
Jun 11 2017 05:31
Can anyone help me in clarifying authentication issues?
I have two set of users, general user and another, called agents, the informations required of them are different, so i decided to make it different apps, app_general and app_agent.
Since they are different i have two AUTHENTICATION_MODEL but the issue is if i use the login details of app_agent in app_general, it authenticates and vice versa
Any help?.
John
@flyboy1565
Jun 11 2017 05:36
Why not just do is_agent and is_general in your groups?
Miracle Ayodele
@iammiracle
Jun 11 2017 05:37
You mean part of my model?
Miracle Ayodele
@iammiracle
Jun 11 2017 06:07
@flyboy1565 is that what you mean
Rishi Pandey
@riskypandey_twitter
Jun 11 2017 06:40
Is the site djangopackages.org down since yester
*yesterday? Can someone please confirm.
If yes, do we have any alternatives.?
Stephen James
@StephenOrJames
Jun 11 2017 07:03
@Cosbgn: I'd personally say pretty bad in general. If your issues are because of using different database engines (e.g. SQLite in dev, MySQL/PostgreSQL in prod), then it would be worth using the same engine in both cases. If it's about the actual data, I'd say it would be a better idea to duplicate the data into a separate database rather than testing directly in production.
@koderNeptune: I think his suggestion may have been to create groups to assign to different types of users and check those (at login if necessary, and certainly before loading any page that should only be accessible by either group).
Kaushal Kumar
@kaushal087
Jun 11 2017 15:19
In my website static files are stored at S3 and hosted by cloudfront.
I want the browser and cdn to cache the static files which these are doing now but the problem is if there is any change in css, js it doesn't re-fetch those files. How can I create version of the static files. Any package for django? I want to change the version of only those files which have been changed.
And version of other static files should not be changed
Leandro Barbosa
@Leeaandrob
Jun 11 2017 15:21
use whitenoice ;) @kaushal087
Kaushal Kumar
@kaushal087
Jun 11 2017 15:33
thanks
@Leeaandrob
How is gulp or grunt?
John
@flyboy1565
Jun 11 2017 16:19
@StephenOrJames , is correct in my thinking @koderNeptune
Costantin
@Cosbgn
Jun 11 2017 17:27
Hello is anyone experience with webhooks?
I'm receiving some data as bytes so something like b'status=ok&results_time=0.0124 etc
I use data.decode('utf-8') to decode it, and I get a str like: status=ok&results_time=0.0124 etc
however inside the string I still have plenty of characters like %5B, %5D etc
how can I get this string to decode this characters and give me back a valid json, or dict?
Costantin
@Cosbgn
Jun 11 2017 17:38
nevermind, urllib.parse.unquote(data) does the job :D