Anonymous
thanks @DimasInchidi u made my day and likely my whole career
inchidi
nice, your welcome
Anonymous
Guys, how to purge data in postgres
Anonymous
Via Django
inchidi
cmiiw manage.py flush
Anonymous
What's cmiiw
inchidi
correct me if I'm wrong
Anonymous
Well, flush doesn't remove everything
Anonymous
I tried it previously
inchidi
so you want to drop db create db?
Lapanit ☃️
Use truncate
Lapanit ☃️
It will delete data, and leave tables and structure
inchidi
found this https://stackoverflow.com/a/10606476 @Sin_atra
Lapanit ☃️
https://dev.mysql.com/doc/refman/5.7/en/truncate-table.html
Anonymous
I'm using postgres
Lapanit ☃️
Ahh
Lapanit ☃️
Ahhhh
Lapanit ☃️
Ok
Lapanit ☃️
Sorry
Anonymous
I left my django project on a website as debug = True
Anonymous
Hope no one got too it
Anonymous
Anyone have trick to hide login page of admin ...?
Anonymous
Yes
How
Anonymous
Well, first of all change the admin url
Anonymous
To something different and difficult
Anonymous
A big random string
Anonymous
And second, if using nginx. Make that page to only available for an IP
Anonymous
Or create a password for that page in nginx
Anonymous
Woow...😁👍
Anonymous
Huh?
Anonymous
How does postgres has to do with it
Anonymous
I mean, is it can implamentation in postgres ...!
Anonymous
Opppssss..typo...
Anonymous
I mean apache....!
Anonymous
Xoxixoxo
Anonymous
Well you can check
inchidi
Valentine just give up and sort those 5 resut man 😄
inchidi
just change your data to data = sorted(requests.get(url).json()['items'], key=lambda x: x['created_at'], reverse = True) github search api doenst support what you need 😕
Tushar
Can someone tell me how to deploy your django project
Tushar
and whats the best place to deploying it
Tushar
and whats the cheapest place of deploying django project
Abhi
@Tusharmalik62 You can try heroku
Abhi
The docs are simple and easy to start with
Tushar
do you know any tutorial or vedio to learn how to do it
Val
just change your data to data = sorted(requests.get(url).json()['items'], key=lambda x: x['created_at'], reverse = True) github search api doenst support what you need 😕
i have tried this before but it didn't work, also i tried it again with the same result, instead it is giving me an empty page
Tushar
can someone please help me
Tushar
@DimasInchidi
inchidi
do you know any tutorial or vedio to learn how to do it
https://devcenter.heroku.com/articles/django-app-configuration
inchidi
can someone please help me
i think easiest way to host your django project is with github
Tushar
ok
Tushar
thanks
inchidi
old iteration in the for loop?
yeah, just use for repo in data: not data entries
Val
i used just that inchidi
inchidi
I will try to host it on github now
but you need to add requirements.txt and Procfile
inchidi
i used just that inchidi
can you show me you newest views.py?
inchidi
okay, how about for in your template?
inchidi
already update it?
Val
already update it?
oh no! update it to what?
inchidi
oh no! update it to what?
data.items to data
Val
okay, how about for in your template?
its works now! Thanks alot. u just save my ass...😊☺😄
inchidi
I will try to host it on github now
this is example of django project on heroku structure example https://github.com/heroku/heroku-django-template
inchidi
note: double curly braces inside your Procfile or .py file gonna be replaced with your setting vars from heroku. {{ app_name }} similar with os.environ("app_name")
Abhi
help anyone
Abhi
i am writing test for my model name post , the test codes are pasted here
Abhi
https://dpaste.de/JVuh
Abhi
getting this error
Abhi
https://dpaste.de/h00F
inchidi
https://dpaste.de/JVuh
are you sure this is File "test_models.py", line 18, in test_url ?
Anonymous
Abhi
there was a bug while creating the model instance
Allan
Hi there. I gotta a problem here and I would highly appreciate some insights. This system I have to fix was beeing developed by someone else which is not "reachable" anymore.