We had a similar requirement in one of our products. We solved it by assigning
the user a unique transaction id when they start the process, and saving all
data in a temp db (redis) until the user completed the process. And whenever
the user accessed a page with the transaction id in the get par
Personally, I'd setup a simple cronjob on my machine that runs a Django
management command. The command would get a list of users who are eligible
to receive emails and send it to them.
I would have just used the send_mail directly from my management command,
but if you already have a RQ setup
Not being able to load CSS points to an Apache config issue. Did you setup
apache so your static root configured to serve files from your static
folder? Your apache config might be helpful here.
Also, what you have pasted here seems like a warning, so while you should
fix it, this is probably n
The ordering of your attributes and methods inside the model class doesn't
have to do with Django, it has to do with Python. Inside a class, the
ordering doesn't matter as far as I understand. All of these documents you
will find are thus just conventions to follow.
You could come up with your
t the CONST declaration comes first,
it works.
On Thursday, August 18, 2016 at 4:08:33 PM UTC+4, Asad Jibran Ahmed wrote:
>
> The ordering of your attributes and methods inside the model class doesn't
> have to do with Django, it has to do with Python. Inside a class, the
> or
Hi,
It's definitely weird to not have a manage.py since all new Django
projects should have it by default. But the manage.py file is pretty
simple, and you can just paste this inside a new manage.py:
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefaul
nd
of server running my Django code takes away that ability, and I'd be in
hell trying to figure out errors without that.
Just my 2 cents.
Asad Jibran Ahmed
http://blog.asadjb.com
On Wed, Aug 24, 2016 at 9:24 PM, Andreas Kuhne
wrote:
>
> 2016-08-24 17:54 GMT+02:00 Michae
/uploads/#django.core.files.uploadedfile.UploadedFile
Pillow (PIL Fork) documentation for the `frombytes` method:
https://pillow.readthedocs.io/en/3.3.x/reference/Image.html#PIL.Image.frombytes
Hope that helps.
Regards,
Asad Jibran Ahmed
http://blog.asadjb.com
On Fri, Aug 26, 2016 at 7:46 PM, ali
You could create a simple blogging application. Allow the user to create,
edit, and delete blog posts. And have a list page (home page) to show those
posts and a details page for the post.
Asad Jibran Ahmed
http://blog.asadjb.com
On Mon, Aug 29, 2016 at 3:29 PM, rajeshkmr9583
wrote:
>
No need to change the context, since the variable names the example here
uses are the same as your existing context. It should work as long as you
remember to {% load APPNAME %} your filters in the template first.
Asad Jibran Ahmed
http://blog.asadjb.com
On Mon, Aug 29, 2016 at 6:50 PM, Aaron
Since the example given by Ludovic uses the same variable names that are
already present in your context, you won't need to change anything in the
context dictionary. Just use
{% load APP_NAME %}
on top of the template file to load the filter and you should be good to go.
On Monday, August 29,
or
> the correct value in the scores dictionary that has the same Number
> identification as the existing person.Number?
>
> I think what is confusing me is the use of "player" in ludovics example
>
> Thanks
>
> Aaron
>
> On Aug 29, 2016 11:53 AM, "Asad Jib
Unfortunately without knowing your project layout I can't show you exactly
how to load the filters, but you should give this a read:
https://docs.djangoproject.com/en/1.10/howto/custom-template-tags/.
Your template should look like the example from Ludovic.
Asad Jibran Ahmed
hat.
Regards,
Asad Jibran Ahmed
http://blog.asadjb.com
On Wed, Sep 7, 2016 at 5:28 PM, miarisoa sandy
wrote:
> Hi guys,
>
> I hope you are doing fine.
> I have googled it but no fruitful results.
> I am a newbie in django and I wonder what is the number maximum django
> that
Hi,
While you didn't show us the Product model, I assume it has a ForeignKey
to the Order model. To filter for Products that have an Order with a sold
status, you should look at the documentation for filtering on relationships
at
https://docs.djangoproject.com/en/1.10/topics/db/queries/#lookup
How are you associating a product with an order? Is there a way to get a
list of products sold for each order?
Asad Jibran Ahmed
http://blog.asadjb.com
On Tue, Sep 20, 2016 at 9:24 AM, Shamaila Moazzam <
shamaila.moaz...@gmail.com> wrote:
> Thanks for you kind response ...I am st
Can you share the Cart model? The Order has a foreign key to Cart. I think
that may be the model holding details of the products.
On Tuesday, September 20, 2016 at 9:32:12 AM UTC+4, Asad Jibran Ahmed wrote:
>
> How are you associating a product with an order? Is there a way to get a
>
o.cart.products:
products_list.append(p)
return products_list
This depends on their being a ManyToMany relationship to Product in the
Cart model.
Asad Jibran Ahmed
http://blog.asadjb.com
On Tue, Sep 20, 2016 at 10:12 AM, Shamaila Moazzam <
shamaila.moaz...@gmail.com> wrote:
>
Just create a new file in whatever text editor you're using (I suggest
Sublime Text if you're looking for options) and save the file as urls.py
inside the polls directory.
Asad Jibran Ahmed
http://blog.asadjb.com
On Fri, Oct 14, 2016 at 8:00 PM, 'Nick Bansal' via Django
se
sources as well.
What's your source?
Asad Jibran Ahmed
http://blog.asadjb.com
On Fri, Oct 14, 2016 at 7:41 PM, M Hashmi wrote:
> Hi,
>
> Is there a library available to import user contact's list?
>
> If you have some piece of code as reference or a lib pl
Just save the file inside the *poll *folder. That creates the file.
Asad Jibran Ahmed
http://blog.asadjb.com
On Fri, Oct 14, 2016 at 9:55 PM, 'Nick Bansal' via Django users <
django-users@googlegroups.com> wrote:
> I tried to create a new file (im using sublime text) bu
Thanks! It's nice to hear my book is useful to someone out there! :)
Back to your question, have you tried this:
https://github.com/mengu/django_contact_importer
Asad Jibran Ahmed
http://blog.asadjb.com
On Sat, Oct 15, 2016 at 2:25 AM, M Hashmi wrote:
>
> I was hoping to fin
you seem to indicate there is more
complicated logic involved than just the simple "Only show this question if
that question had and answer matching X". But this is a reasonable starting
point for something like this. As you develop your application further
you'll learn much more abo
that jumps to my mind for something like this.
Is that a possibility that you can consider? If not, then I'm sure there
will be better answers to your question from other people in this group.
Regards,
Asad Jibran Ahmed
http://blog.asadjb.com
On Tue, Oct 18, 2016 at 10:45 PM, Александр Х
might work for
you. Otherwise you'll have to remove your existing database and run
migrations from start.
Asad Jibran Ahmed
http://blog.asadjb.com
On Mon, Oct 24, 2016 at 4:37 AM, Shazia Nusrat
wrote:
> Hi,
> I am trying to create multiple types of users in my django e-commerce
&g
e key. This is similar to what you're doing with your
UserDetails models.
Hope that helps.
Asad Jibran Ahmed
http://blog.asadjb.com
On Mon, Oct 24, 2016 at 7:18 AM, Shazia Nusrat
wrote:
> I've deleted DB and migrations I had previously.
> But still can't figure this out. What
guidelines.
Asad Jibran Ahmed
http://blog.asadjb.com
On Mon, Oct 24, 2016 at 11:47 AM, Deep Shah wrote:
> What kind of methods should be part of the models and what should be in
> the views? Can anyone give me an example of a method which should be in a
> Model than the views file?
>
Do you have debugging turned on (DEBUG=True in settings.py) in Django? If
you do, you should see a pretty detailed stack trace and not just this.
Also, in the console you should see a stack trace with the details of the
error. Do you see those?
Asad Jibran Ahmed
http://blog.asadjb.com
On Sun
Hi Anjali,
Where inside your project are you storing the nbsp.py file?
Regards,
Asad Jibran Ahmed
http://blog.asadjb.com
On Tue, Jan 10, 2017 at 11:09 AM, wrote:
> I have a data attached with multiple spaces, I want to print the data on
> html page along with spaces but in html spac
Can you try moving the templatetags directory to be underneath the webpage
directory. I think that templatetags should be a part of an app.
Right now your templatetags are under the mysite folder, which if I'm not
wrong isn't considered an app.
Regards,
Asad Jibran Ahmed
http://blog.
30 matches
Mail list logo