Authenticate users with both username and email

2015-01-15 Thread Kakar Nyori
I have extendted the *UserCreationForm* with email and other fields, so that I could authenticate a user with both its username and email. forms.py: > class UserCreationForm(UserCreationForm): > class Meta: > model = User > fields = ('first_name', 'last_name', 'username', 'email',) views.p

Handle multiple modelforms in one html form

2015-01-17 Thread Kakar Nyori
A user will have photos which will be related with their specific album. So this was the model for that: class Album(models.Model): > user = models.ForeignKey(User) > title = models.CharField(max_length=200) > pub_date = models.DateTimeField(auto_now_add=True, auto_now

amazon s3 and django - Allow only the users from my website and not the anonymous users

2015-02-06 Thread Kakar Nyori
I am using amazon s3 to store uploaded user images. My problems are: - If I permit or grantee for me, I cannot upload or download the contents. - If I permit or grantee for everyone, all the users and (especially) anonymous users will be able to see the contents, which I don't want. So, my quest

Re: amazon s3 and django - Allow only the users from my website and not the anonymous users

2015-02-07 Thread Kakar Nyori
t; this should be the default if you use the "url" property. E.g., > > signed_url = status_obj.image.url > > Then keep the file itself private. No one will be able to access it > without a signed URL, and you can control who gets a signed URL in your > Django app. >

Re: How to make a phone number field mandatory like password.

2014-09-26 Thread Kakar Nyori
You can do it in the form itself. On Fri, Sep 26, 2014 at 8:49 PM, Sachin Tiwari wrote: > Hi > > I am learning django and I want to add a phone number field which would be > mandatory when we use add user button in users section. > > I tried it with blank=False or null=False but it would not wo

no module in error log django-1.3.7

2014-10-22 Thread Kakar Nyori
Hello, I am trying to run a python app in pythonanywhere.com. If I run the project through the bash it runs without any error. But when I see it in the browser with the name like myproject.pythonanywhere.com, it display "something went wrong". And when I check in the error log, it show me this: no

Re: broken image on my django production site. Why is it?

2014-11-02 Thread Kakar Nyori
I think, you should add "static"/ in your html: Or else change your directory settings. On Sat, Nov 1, 2014 at 8:21 PM, rdyact wrote: > > > I just product my site using Heroku and I

Re: Django + Database Connections

2014-11-11 Thread Kakar Nyori
Very nicely explained. On Wed, Nov 12, 2014 at 2:55 AM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > Hi Edward, > > On Tue, Nov 11, 2014 at 12:30 AM, Edward Armes > wrote: > >> Hi there, >> >> I am currently looking at Django for a personal project. While I >> understand how a lot of

Re: Swampdragon, the realtime framework for Django seems interesting. But will it scale ?

2014-11-11 Thread Kakar Nyori
Oooh! Nice one. But its very new though. I would also like to hear from the experts!!! Thanks for the post though On Wed, Nov 12, 2014 at 10:07 AM, Suren Sth wrote: > I recently came across Swampdragon ( Visit official site > ). I am curious can it be used in production

Re: Uploadfile form and CSS Style

2014-11-13 Thread Kakar Nyori
Then you need to apply css to the form. On Fri, Nov 14, 2014 at 1:16 AM, Russo wrote: > Hi, > > i just implemented the uploadfile form on Django, and everything goes > greate, but i would like to do if it is possible to apply CSS styles to the > upload botton on the forms, Anybody knows this? >

Re: Want to change home->blog to Admin home -> blog

2014-11-15 Thread Kakar Nyori
Your question is unclear. Please try to elaborate more. On Sat, Nov 15, 2014 at 4:37 PM, Sachin Tiwari wrote: > > > On Thursday, November 13, 2014 7:49:28 PM UTC+5:30, Sachin Tiwari wrote: >> >> Hi All, >> >> I want to change Home link at admin page to Admin Home -> blog -> ... >> >> I tried

Re: Uploadfile form and CSS Style

2014-11-18 Thread Kakar Nyori
>>>> >>> enctype="multipart/form-data"> >>>> {% csrf_token %} >>>> >>>> {{ form.non_field_errors }} >>>> {{ form.docfile.label_tag }} {{ form.docfile.help_text >>>> }}

Review needed

2014-03-02 Thread Kakar Nyori
Hello, This may be long, but I really need your help. I have a class *Asset*, which is the *base class* of another *classes *(like *Photo, Question, Video etc.*) Basically its a *Multiple Table Inheritance*. I need this to get all the post or all the *objects* of the user. And it does what I wan

Re: Django and Long Polling

2014-03-23 Thread Kakar Nyori
You mean requesting db in the given time? On Sun, Mar 23, 2014 at 8:50 AM, Venkatraman S wrote: > Why not use (async)callbacks? > > -V > > > On Sun, Mar 23, 2014 at 1:11 AM, Robin Lery wrote: > >> Hello, >> I need to implement long polling in my application to retrieve the >> events. But I hav

Re:Autoupdate

2014-04-14 Thread Kakar Nyori
Ajax is the way to go. Or else, web sockets. On Apr 14, 2014 5:59 PM, "Saransh Mehta" wrote: > I want some data to autoupdate on my homepage as more entries come into > the database. It is more or less like the news feed feature of Facebook. > How do we do that? > > -- > You received this messag

Create objects using a start date, an end date and time list

2018-02-15 Thread Kakar Nyori
I have an Event model, and each event will have different shows. class Event(models.Model): title = models.CharField(max_length=200) class Show(models.Model): event = models.ForeignKey(Event, on_delete=models.CASCADE) date_time = models.DateTimeField(unique=True)

Understanding django channels persistant data

2016-12-20 Thread Kakar Nyori
I am trying to grasp the concept of persistant data in django channels . I have searched the reference and other parts but didn't clear my confusion. I would really appreciate if you help me understand better. consumer

Re: Understanding django channels persistant data

2016-12-20 Thread Kakar Nyori
.content['text']*, but instead its *"text": message['text']*? Thank you Kakar Nyori -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send a

Re: Understanding django channels persistant data

2016-12-20 Thread Kakar Nyori
a great tool for us. Kakar Nyori -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, sen

Re: What is the best combination of components when installing Django on Windows 10?

2016-12-28 Thread Kakar Nyori
Hi, I use windows, and I too was confused about these things. The best recommendation I got was to use *Vagrant, *and to this day I use it. *"Vagrant is a tool for building complete development environments."* Basically you select an environment like ubuntu OS (called vagrant box), and then y

Migrating from django user model to a custom user model

2017-03-14 Thread Kakar Nyori
I am following these two references (one and two ) to have a custom user model in order to authenticate via email and also to add an extra field to it.

How to django with jquery-mobile

2015-07-29 Thread Kakar Nyori
Django provides many features for the template (extends, block content etc.) I am just learning jquery mobile, but so far when using jquery mobile, there's just one actual html page and inside it we have to create a page (data-role="page"). So, how can we utilize the django's templating features wi