Re: django JsonResponse

2017-06-28 Thread m712 - Developer
You may want to take a look at http://www.django-rest-framework.org/ The error tells you exactly what's wrong: MyModel object is a Model, which is not iterable. You want to serialize the MyModel object, which is possible with Django Rest Framework. I usually advise against using JsonResponse over

Re: Custom field implementing Boolean Field is having response value as None instead of False

2017-06-19 Thread m712 - Developer
Melvyn was not saying whether you were checking for None. If `value` is i.e. "some string" your to_python method will return `None`. You should do something like this: ```     if value in ('t', ...): return True     elif value in ('f', ...): return False     else: return bool(value) # You can

Re: ModuleNotFoundError: No module named 'models'

2017-05-29 Thread m712 - Developer
How do you expect us to understand your problem if you give us no context at all? For all I know this error could be a file system corruption. On May 30, 2017 2:42 AM, jinghui yang wrote:ModuleNotFoundError: No module named 'models'How to fix this error? -- You received this

Re: Please help me

2017-05-29 Thread m712 - Developer
You just made my day. On 05/29/2017 12:52 PM, Opeyemi Gabriel wrote: > Django girls, am a guy > > On May 29, 2017 13:20, "Jani Tiainen" > wrote: > > Hi, > > If you feel that Django tutorial is too compact, Django Girls do > have much

Re: Django not showing updated data

2017-05-18 Thread m712 - Developer
You most likely have a variable as a rest of query that's defined at module level. Something like: records = models.Record.objects.all() def my_view(request):     ... You need to put your variables inside views if you want them fresh every view. Otherwise Django will fetch it when you start

Re: Email conformation problem

2017-05-17 Thread m712 - Developer
ot; on your favorite search engine. Learn to research a little, please. Other than that, try what James suggested. On May 17, 2017 1:12 PM, Ismail Sarenkapic <ismailgi...@gmail.com> wrote: > > Ok, so how do I solve this problem of fishing content in my mails? > > On Wednesday,

Re: Email conformation problem

2017-05-17 Thread m712 - Developer
That's a pretty rude way to reply for someone who is asking questions. Many major email providers mark emails from servers without a PTR record to their domains as "spam". On May 17, 2017 9:52 AM, Ismail Sarenkapic wrote:lol, It is Django related question and can be solved

Re: Unicode error in __unicode__(self) function

2017-05-09 Thread m712 - Developer
On May 9, 2017 11:42 AM, Melvyn Sopacua wrote: > I'm sorry - but this isn't your real error. Your error is in another castle? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Link to download

2017-05-02 Thread m712 - Developer
You cannot get a file outside of your project unless you symlink it inside the project. This is also a Very Bad Thing(TM) as it may allow attackers to request arbitrary files. What you should do instead is this: 1) Put Data/01/export.txt to the static/ folder inside your app (with the same

Re: Displaying the multiple images in the product detail page

2017-04-25 Thread m712 - Developer
I forgot a second {% endfor %} below the there, but you get the idea. On Apr 26, 2017 6:29 AM, m712 - Developer <comeon@getbackinthe.kitchen> wrote:Stop replying over and over again with the same content, we saw it. Regarding your question, I don't know whether you're referring to item[0].i

Re: Displaying the multiple images in the product detail page

2017-04-25 Thread m712 - Developer
Stop replying over and over again with the same content, we saw it. Regarding your question, I don't know whether you're referring to item[0].image[x] or item[x]. If you're refferring to the first one then please consider renaming your variables. In any case; this:          {% for item in

Re: for loop + transaction.on_commit + celery = Unexpected Behaviour

2017-04-24 Thread m712 - Developer
I'm not too familiar with Celery, but I think that for loop continuously keeps changing transaction's commit event handler. Maybe you are looking for something like transaction.commit instead of on_commit? On Apr 24, 2017 2:37 PM, Emilio Jimenez Canalejo wrote:Hi, I've been

Re: AttributeError: module 'polls.views' has no attribute 'index'

2017-04-19 Thread m712 - Developer
You didn't give us enough info, but I am thinking that you don't have an index() function in your polls/views.py. Start the tutorial from the beginning and follow it closely. On Apr 19, 2017 4:17 PM, Billy Lin wrote:I'm following the getting started tutorial 01 and running into

Re: Django forks

2017-04-17 Thread m712 - Developer
You can always make an extension. Many popular things in the framework are contributions from the community including the current default authentication system. It doesn't have to be in a fork either.On Apr 17, 2017 5:57 PM, Jamesie Pic wrote: > > Dear Andréas, > > During

Re: Creating multiple objects with one request in Django Rest Framework

2017-04-16 Thread m712 - Developer
Hi, Take a look at https://docs.djangoproject.com/en/1.11/topics/db/examples/many_to_many/ On Apr 17, 2017 8:19 AM, Aamu Padi wrote:I am using Django as the backend server and Vue.js for the front end Movie app.I have a Ticket modelclass MovieTicket(models.Model): show =

Re: Mysql/Models

2017-04-16 Thread m712 - Developer
On Apr 17, 2017 12:57 AM, alkhair...@mymail.vcu.edu wrote: > > I am not exactly sure how to do this, so any help would be great. The shell is just a Python REPL, you can run any Python code in it. Consider: >>> from yourapp import models >>> models.YourModel.objects.first() >Further, am I

Re: Dynamic Selector with Django/Jquery

2017-04-15 Thread m712 - Developer
You can create a URL in your application to which your AJAX code will send the details and the amount of items it wants and your application will return the items in JSON format. Take a look at https://docs.djangoproject.com/en/1.11/topics/db/queries/ to learn about how to filter and limit your

Re: method's name in MIDDLEWARE

2017-04-15 Thread m712 - Developer
You should take a look at https://docs.djangoproject.com/en/1.11/topics/http/middleware/#process-view It is not a reserved keyword but simply a function that is called by the Django middleware system. On Apr 15, 2017 4:47 PM, shahab emami wrote:hello i want to learn

Re: How To style a Django formset for fileField

2017-04-14 Thread m712 - Developer
remove the ambiguity and then recreating my migrations. Apologies for wasting your time! ^^ Best Regards, m712 - Developer -- 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

Re: How To style a Django formset for fileField

2017-04-14 Thread m712 - Developer
Ahaha, apologies again. I am very new to mailing lists and ended up replying to someone who didn't reply to me. Please remove my messages if possible. Sorry! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and