These are chat archives for django/django

13th
Dec 2016
sha
@sha12
Dec 13 2016 16:15
Hello people. i am new to web dev. i have learnt django recently and developed a couple of web apps with it. i am not sure how to proceed next. i want to build my career as django developer. any advice on where i can find some open source django projects to work on and what steps should i take next would be helpful :)
Philip Eckert
@pae4557
Dec 13 2016 17:48
anybody ever run into their form validators failing because the form is loaded with 'none's instead of variables? This is how I'm setting the 'form' var:
```
try:
hydroInstance = HydroGraph.objects.get(name=request.user.username)
form = HydroGraphForm(instance = hydroInstance, data=request.POST)
except HydroGraph.DoesNotExist:
    form = HydroGraphForm(request.POST or None,initial = {'static_Pressure':misc.hydrograph['static_Pressure'],
        'residual_Pressure':misc.hydrograph['residual_Pressure'],'supply_Flow':misc.hydrograph['supply_Flow'],
        'required_Pressure':misc.hydrograph['required_Pressure'],'required_Flow':misc.hydrograph['required_Flow'],
        'elevation':misc.hydrograph['elevation'],'safety_Factor':misc.hydrograph['safety_Factor'],
        'hose_Requirement':misc.hydrograph['hose_Requirement'], 'pump_Type':misc.hydrograph['pump_Type'],
        'rated_Flow':misc.hydrograph['rated_Flow'],'rated_Pressure':misc.hydrograph['rated_Pressure'],
        'hose_Thru_Pump':misc.hydrograph['hose_Thru_Pump'],'flow_1':misc.hydrograph['flow_1'],
        'flow_2':misc.hydrograph['flow_2'],'flow_3':misc.hydrograph['flow_3'],
        'flow_4':misc.hydrograph['flow_4'],'flow_5':misc.hydrograph['flow_5'],
        'flow_6':misc.hydrograph['flow_6'],'pres_1':misc.hydrograph['pres_1'],
        'pres_2':misc.hydrograph['pres_2'],'pres_3':misc.hydrograph['pres_3'],
        'pres_4':misc.hydrograph['pres_4'],'pres_5':misc.hydrograph['pres_5'],
        'pres_6':misc.hydrograph['pres_6']})
    username = request.user.get_username()
    hydroInstance = HydroGraph(name=username, static_Pressure=misc.hydrograph['static_Pressure'], 
        residual_Pressure=misc.hydrograph['residual_Pressure'], supply_Flow=misc.hydrograph['supply_Flow'],
        required_Pressure=misc.hydrograph['required_Pressure'], required_Flow=misc.hydrograph['required_Flow'], 
        elevation=misc.hydrograph['rated_Flow'], safety_Factor=misc.hydrograph['safety_Factor'], 
        hose_Requirement=misc.hydrograph['hose_Requirement'], pump_Type=misc.hydrograph['pump_Type'])
    hydroInstance.save()
    hydroInstance = HydroGraph.objects.get(name=request.user.username)
    form = HydroGraphForm(instance = hydroInstance, data=request.POST)
leeeandroo
@leeeandroo
Dec 13 2016 18:38
Could anyone help me about some question of ManifestStaticFilesStorage?
It's not clear to me how It works. I need a way to prevent cache of static files (JS, CSS) when I deploy a new version, I saw that when I use the ManifestStaticFilesStorage and run collectstatic, It create the files with a hash. Do I need to put this hash on {% static 'file.js' %} or django do this for me automatically? Is it the best way to solve my problem?
Any tips?
Jeffrin Jose T
@ahiliation
Dec 13 2016 18:48
hello all
Philip Eckert
@pae4557
Dec 13 2016 18:50
hi @ahiliation
: )
Jeffrin Jose T
@ahiliation
Dec 13 2016 18:52
@pae4557 hello
@pae4557 i like to chat about something which is not typically about django
bye
leeeandroo
@leeeandroo
Dec 13 2016 19:01
No one know something about ManifestStaticFilesStorage? :(