Different content type objects in django template

2014-03-06 Thread Robin Lery
I am having a hard time to understand ContentType. I am learning from a tutorial, this is the link . I have synced the database, and its working in the admin. But when I try to load the ContentType objects in the template, I get nothing. When I see the page source, the get_rendered_method is not lo

problem in setting up gunicorn and django

2014-03-17 Thread Robin Lery
I am trying to set up gunicorn for Django by following this blog. I created the *gunicorn_start* script and gave it permission: *$ sudo chown -R hello:users /webapps/hello_django* *$ sudo chmod -R g+w

Re: Custom Login page in Django

2014-03-20 Thread Robin Lery
do you have {% csrf_token % } in your forms? On Thu, Mar 20, 2014 at 7:36 PM, Aryak Sengupta wrote: > I am new to Django (but not new to python) and I am looking forward to > create a customized page using django. I have read about django's inbuilt > authentication system but I want build it f

Django and Long Polling

2014-03-22 Thread Robin Lery
Hello, I need to implement long polling in my application to retrieve the events. But I have no idea how to do it. I know the concept of long polling, i.e to leave the connection open, until an event occurs. But how do I do implement this in my project. If you could give me a simple long polling ex

Multiple websocket connection vs single websocket connection when using django channels

2018-04-06 Thread Robin Lery
separate connection? Or is it better to have only one websocket connection for a user, and work around that single connection for different features? Sincerely, Robin -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Multiple websocket connection vs single websocket connection when using django channels

2018-04-07 Thread Robin Lery
Yes, I guess that's how to work around per connection for a user. Thank you for your input! On Fri, Apr 6, 2018 at 9:49 PM, Ken Whitesell wrote: > Hi Robin, > > I can't speak to any generalized situations, or what might be considered > "best practices" or mos

Allow users to vote up, down or nothing

2016-06-06 Thread Robin Lery
Hello, I have made an app to create article. This is the model: class Article(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL) title = models.CharField(max_length=150) body = models.TextField() pub_date = models.DateTimeField(default=timezone.now) tags = models

Cannot login with user credentials

2016-07-23 Thread Robin Lery
I have a made custom user model. class CustomUserManager(BaseUserManager): def _create_user(self, email, username, password, first_name, last_name, date_of_birth, gender, mobile_number, is_active, is_admin, is_superuser): """ Creates and saves a user with g

Re: Cannot login with user credentials

2016-07-23 Thread Robin Lery
But again, with the superuser's credentials, I can login On Sat, Jul 23, 2016 at 12:47 PM, Robin Lery wrote: > I have a made custom user model. > > class CustomUserManager(BaseUserManager): > def _create_user(self, email, username, password, first_name, > last_name, d

Re: Happy New Year 2017

2016-12-31 Thread Robin Lery
Happy new year! On 1 Jan 2017 12:05 a.m., "pradam programmer" wrote: > Happy New Year Guys, i hope this year fill with alot of love, happiness > and Joy to everyone. > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from

Filter a contenttype with the content object's field

2017-01-03 Thread Robin Lery
I creating an app where users can post with its related tags: class Tag(models.Model): name = models.CharField(max_length=255, unique=True) class Post(models.Model): user = models.ForeignKey(User) body = models.TextField() tags = models.ManyToManyField(Tag) pub_date = models.D

Re: Filter a contenttype with the content object's field

2017-01-03 Thread Robin Lery
be with the list of content_object's (i.e. Post of Photo) field (i.e. Post.tags or Photo.tags). On Wed, Jan 4, 2017 at 12:43 AM, Robin Lery wrote: > I creating an app where users can post with its related tags: > > class Tag(models.Model): > name = models.CharField(max_l

Re: Filter a contenttype with the content object's field

2017-01-04 Thread Robin Lery
Yes, this works. Thank you. But, as there are or will be more than one ContentType objects (i.e., Post model and Photo model), how do I iterate over it? Should I query them separately? Like post_activities = Activity.objects.filter(post__tags__in=tags).distinct() photos_activities = Activity.object

Override save method to add list in the many to many field

2017-01-04 Thread Robin Lery
I have this model to save post from the users: class Tag(models.Model): name = models.CharField(max_length=255, unique=True) def add_tags(obj_id, body): object = Post.objects.get(id=obj_id) tag_list = [Tag.objects.create(name=word) for word in body.split()] for tag in tag_list:

Re: default groups and permissions

2019-01-08 Thread Robin Riis
x Nebojsa! but could you please show me a full example? Den måndag 7 januari 2019 kl. 13:18:37 UTC+1 skrev Nebojsa: > > you can do it from views.py inside signup function > if Försäljningschef > then if exist() sign there, if not create that group. > > I will be at home in few hours s

Re: ModuleNotFoundError: No module named 'sample,'

2019-03-07 Thread Robin Riis
from .models import Sample Den tors 7 mars 2019 10:44 skrev: > Hi Team > > My project name is Sample > While I am trying to connect database with models.py > I am finding these type of errors > ModuleNotFoundError: No module named 'sample,' > Can anybody help me. > > -- > You received this messa

Re: How to use updated model.py from the shell

2019-03-31 Thread Robin Riis
Just re import and redeclare the variable? from app import model x = thing.objects.all() Den sön 31 mars 2019 16:46Betty skrev: > Hi all, > > I am new to django and following tutorials. > > I realized that even if I modified models.py while I was using > shell(python manage.py shell) the modif

[formset] ManyToMany

2019-04-09 Thread Robin Riis
if i have the following models: class Wiggs_Filter(models.Model): wiggs_nr = models.CharField(max_length=30, unique=True, blank=True, null=True) picture = models.ImageField(upload_to='filter/', default='filter/saknas.jpg') description = models.CharField(max_length=100, blank=True, null

Re: HTML form filled, proposes a download link for the data filled in a json file

2019-04-09 Thread Robin Riis
Hello! well in the form is there anything that will be saved in a database? if so you can start by looking at models.py in your application. if not you can jump directly to forms.py. an example of a model and form: *** in models.py from django.db import models class Company(models.Model):

Re: how do I create a slug in Django 2.2

2019-04-09 Thread Robin Riis
def save(self, *args, **kwargs): self.slug = slugify(self.title) super(name, self).save(*args, **kwargs) Den tis 9 apr. 2019 12:24AMI FIDELE skrev: > I have tried to create a slug watch here and please tell the problem > > this is model.py > > from django.db import models > > # this is m

Re: UniqueConstraint raises uncaught IntegrityError in Admin

2019-04-09 Thread Robin Riis
The Integrity error means that there is a row in the database with role = 1 So another row with role=1 would break the unique constraint and is not allowed. So either remove the unique constraint or make sure it will be unique. Den tis 9 apr. 2019 13:29Ryan Jarvis skrev: > Hey there, > > I'm tr

Re: How to run ORM commands from DOM Javascript?

2019-04-09 Thread Robin Riis
in models.py you can define a 'as_json' function def as_json(self): return dict( identification_number = self.id awesome_picture = self.picture ) in views.py: class My_View(View): def get(self, request): if request.is_ajax(): q = request.GET.get('q

m2m createview bootstrap modal

2019-04-25 Thread Robin Riis
Hello Django community :D i am currently learning django and am working on a vehicle app where i currently have this models.py class Engine(models.Model): objects = EngineManager() manufacture = models.CharField(max_length=80) name = models.CharField(max_length=80) filter_to_use =

Re: Comment Form Related issue

2019-04-26 Thread Robin Riis
class Comment(models.Model): message = models.TextField() video = models.ForeignKey(Video, related_name='comments', on_delete=models.CASCADE) created_at = models.DateTimeField(auto_now_add=True) created_by = models.ForeignKey(get_user_model(), related_name='comments', on_delete=models.CASCADE)

Re: Comment Form Related issue

2019-04-26 Thread Robin Riis
7;m new to django so let me check once. > Thank You for your response. > > On Fri, Apr 26, 2019 at 4:36 PM Robin Riis wrote: > >> class Comment(models.Model): >> >> message = models.TextField() >> >> video = models.ForeignKey(Video, related_nam

Re: Comment Form Related issue

2019-04-26 Thread Robin Riis
) cheers mate Den fre 26 apr. 2019 kl 14:05 skrev Soumen Khatua : > Okay,Could you tell me If any user want to update their comment it later > the process is same or different? > > Thank You > > > On Fri, Apr 26, 2019 at 5:31 PM Robin Riis wrote: > >> class

models

2019-05-07 Thread Robin Riis
if i have a model like class ShelfManager(models.Manager): use_for_related_fields = True def create_cabinet(self, name, number_of_shelfs): cabinet = self.create(name=name, number_of_shelfs=number_of_shelfs) created_shelfs = 0 while created_shelfs < number_of_shelfs: cabinet.shelfs.create()

Cannot install channels

2017-02-09 Thread Robin Lery
Hi, I already had a django channels in my other virtual env. But since its an older version of channels (0.7.0) I am trying to install a new channel version into my project which is in a different virtual environment inside a a vagrant box. I created a new virtualenv > $ mkvirtualenv newsapp >

Re: Cannot install channels

2017-02-09 Thread Robin Lery
ror. > > Andrew > > On Thu, Feb 9, 2017 at 10:51 PM, Robin Lery wrote: > >> Hi, >> >> I already had a django channels in my other virtual env. But since its an >> older version of channels (0.7.0) I am trying to install a new channel >> version into my pr

Re: Cannot install channels

2017-02-09 Thread Robin Lery
t it was happy with (the more recent releases increased the Twisted > version requirement), or the version of Twisted it downloaded did not > require compilation. > > Andrew > > On Thu, Feb 9, 2017 at 11:10 PM, Robin Lery wrote: > >> Yes that was it. Thank you. Could y

Django rest framework cannot deal with multple objects in model viewset

2017-04-20 Thread Robin Lery
I have a very simple model and its related serializer and views: class Page(models.Model): user = models.ForeignKey(User) title = models.CharField(max_length=255) pub_date = models.DateTimeField(default=timezone.now) class PageSerializer(serializers.ModelSerializer): class Meta:

Django rest framework JWT and custom authentication backend

2017-05-26 Thread Robin Lery
I have a custom user model and have created a custom authentication backend. I am using django rest framework JWT for token authentication. User model: class User(AbstractBaseUser, PermissionsMixin): e

Django runserver not working after installing redis for django channels

2017-09-11 Thread Robin Lery
nknown command 'EVALSHA' I have installed the asgi_redis in my virtualenv, and also installed Redis server. What am I doing wrong here? Here are the useful versions that I am using: - channels==1.1.6 - asgi-redis==1.4.2 - daphne==1.3.0 - Django==1.11.5 Sincerely Robin --

Re: Django runserver not working after installing redis for django channels

2017-09-12 Thread Robin Lery
Yes, i think just running `sudo apt-get install redis-server` installs the old version of redis, instead of the latest one. On Mon, Sep 11, 2017 at 6:40 PM, Artem Malyshev wrote: > Hi, > > Please check your redis installation. It should be at least minimum > required version by redis-py. > > Reg

How to authenticate a user in websocket connection in django channels when using token authentication

2017-09-14 Thread Robin Lery
I am using a frontend framework (Vuejs ) and django-rest-framework for the REST API in my project. Also, for JSON web token authentication I am using django-rest-framework-jwt . After a s

Validate and get the user using the jwt token inside a view

2017-09-14 Thread Robin Lery
I am using django-rest-framework for the REST API and django-rest-framework-jwt for JSON web token authentication. After a successful login, the user is provided with a token. I have found how to verify

Re: Validate and get the user using the jwt token inside a view

2017-09-15 Thread Robin Lery
to decode handler inside the code. > > -- > sincerely, > Oon Arfiandwi > > > On Fri, Sep 15, 2017 at 10:11 AM, Robin Lery wrote: > >> I am using django-rest-framework <http://www.django-rest-framework.org/> >> for the REST API and django-rest-framework-jwt >

Re: Validate and get the user using the jwt token inside a view

2017-09-16 Thread Robin Lery
I was about to that by this from rest_framework_jwt.serializers import VerifyJSONWebTokenSerializer data = {'token': token} valid_data = VerifyJSONWebTokenSerializer().validate(data) user = valid_data['user'] Hope this helps any body like me. On Sat, Sep 16, 2017 at 9:34 A

Re: How to authenticate a user in websocket connection in django channels when using token authentication

2017-09-16 Thread Robin Lery
{ "text": "Authentication error", "close": True }) On Fri, Sep 15, 2017 at 10:37 PM, Andrew Godwin wrote: > You'll have to write your own authentication code that runs in `connect` > and puts a user into the channel sessi

Channels architecture for chat application and subscriptions

2017-09-17 Thread Robin Lery
"liveblog" groups. Suppose, there's a website where many authors write their blogs, and a user is subscribed to many authors (e.g.: "Adam", "Mary", "Robin", ...). And, if a author starts its blog, a connected user will get notified. So here

Re: Channels architecture for chat application and subscriptions

2017-09-17 Thread Robin Lery
consider here is that suppose a thread has a large number of users (say, more than 20,000 users), will the above solution be unwise for this type of situation? Sincerely, Robin On Sun, Sep 17, 2017 at 11:22 PM, Andrew Godwin wrote: > Hi Robin, > > The most efficient way to do this is t

Re: Channels architecture for chat application and subscriptions

2017-09-22 Thread Robin Lery
Okay. Thank you. Really appreciate what you guys are building. Sincerely, Robin On Thu, Sep 21, 2017 at 1:10 AM, Andrew Godwin wrote: > Yes, you can do as you suggest, but you're also right that it will be slow > to send. Groups are more efficient in theory, but right now

Re: Django 2.0 alpha 1 released

2017-09-22 Thread Robin Lery
+1 On Sat, Sep 23, 2017 at 12:16 AM, Tim Graham wrote: > We've made the first release on the way to Django's next major > release, Django 2.0! With just a little over two months until the > final release (scheduled for December 1), we'll need timely testing > from the community to ensure an on t

Re: Learning Django problems

2015-07-29 Thread Robin Lery
Do u have static directory? And does it have the required resources? On 29 Jul 2015 16:50, "Roshan Pannase" wrote: > sir i am a new learner can you send me the code of this application > > On Wed, Jul 29, 2015 at 11:33 AM, Stas soroka > wrote: > >> I'm currently reading a book "Learning Django

Re: same field in two classes

2015-08-02 Thread Robin Lery
You can use inheritance. Or content type. Or use signals to get the value of salary from one model and save it to another model. On 2 Aug 2015 23:38, "Alex Heyden" wrote: > Sorry, I think there might be a bit of a language barrier. What do you > mean by "take the value of employee salary to payro

Upload new file to the uploaded file path

2015-08-04 Thread Robin Lery
I have a model for Video: class Video(models.Model): title = models.CharField(max_length=75) pubdate = models.DateTimeField(default=timezone.now) original_video = models.FileField(upload_to=get_upload_file_name) mp4_720 = models.FileField(upload_to=get_upload_file_name,blank=True,

Re: Celery to process task and modify the model fields

2015-08-04 Thread Robin Lery
Hi, Thank you so very much kind sir. This really helped! On Wed, Jul 15, 2015 at 4:08 PM, 'Tom Evans' via Django users < django-users@googlegroups.com> wrote: > On Tue, Jul 14, 2015 at 9:15 PM, Robin Lery wrote: > > Yes. That time you were the one to guide me. I was lo

Re: Upload new file to the uploaded file path

2015-08-08 Thread Robin Lery
It works perfectly! I am using it to upload in s3, and even for s3 it works as it is supposed to. I am really grateful to you. Thank you. On Wed, Aug 5, 2015 at 4:37 PM, 'Tom Evans' via Django users < django-users@googlegroups.com> wrote: > On Tue, Aug 4, 2015 at 9:45 PM

Re: No module named 'blog'

2015-08-09 Thread Robin Lery
Did you add your 'blog' app in the installed apps in settings.py? On Sun, Aug 9, 2015 at 10:35 PM, Maggie Chang wrote: > hi all, > would like to seek for everyone's help. > I am following the django girls instruction => > http://tutorial.djangogirls.org/en/django_urls/index.html#your-first-djang

Re: Different auth user models withoout doing multi-table inheritance

2015-08-10 Thread Robin Lery
You surely can use Choice field for either Customer or Merchant in your custom user class. On 10 Aug 2015 20:12, "Avraham Serour" wrote: > I personally like a profile model, but if you implement two you may have > headaches when doing a reverse relation from user, you would need to check > every

Re: Django clustering - How to manage Image uploading

2015-09-09 Thread Robin Lery
You upload all your images into s3. On 9 Sep 2015 17:23, "Gabriele Morgante" wrote: > Hi, > > I developed a Django 1.8.4 webapp and now I've to deploy it in production > environment. The app allows users to upload images on the server. My > problem is that in a production environment I've many se

Re: django on Windows

2015-10-01 Thread Robin Lery
Did you install python? And is it in your environmental variable? If both the answers yes then you could try all the commands using cmd prompt in windows. On 1 Oct 2015 17:51, "Антон Заровский" wrote: > How use concole commands at windows? > > -- > You received this message because you are subscr

Re: Exchange models between apps

2015-10-17 Thread Robin Lery
Can u try this from userprofile.models import UserProfile On 17 Oct 2015 19:24, "svewa" wrote: > Hello everyone, > > I have a problem with using models between django apps. In my project I > have an app called *userprofile *containing a model *UserProfile*. In > another app where I have a model *

Django on CentOS

2015-11-08 Thread Robin Fourcade
hing to do. Can somebody help me ? Thanks, Robin Fourcade. -- 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. T

Re: Django on CentOS

2015-11-08 Thread Robin Fourcade
Hi, Thanks for your answer ! (I'd add that even if apache is running, if I run the server on the port 8000, I can acces the django project on this port without any issue) Here's the log [Sun Nov 08 14:46:41 2015] [error] [client 109.10.154.52] mod_wsgi (pid=22420): Exception occurred processing

Re: Django on CentOS

2015-11-09 Thread Robin Fourcade
Hello, thanks for the answer. I've this code in my wsgi: import os, sys #Calculate the path based on the location of the WSGI script apache_configuration = os.path.dirname(__file__) project = os.path.dirname(apache_configuration) workspace = os.path.dirname(project) sys.path.append(workspace) os

Re: Django on CentOS

2015-11-09 Thread Robin Fourcade
the previous tutorial, which actually seems to be not so great. > • Is pizzaclub/settings.py available if you stand in any of those > directories? (Ie. try cd ; ls pizzaclub/settings.py) > > It's available, as we can see in my tree. > Best, > Gergely > Thanks, Ro

Re: Django on CentOS

2015-11-09 Thread Robin Fourcade
ou know a great tutorial which shows how to install&run a django project on one of theses distributions, it would be perfect! :) Thanks again ! Robin. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this gr

Re: Django on CentOS

2015-11-10 Thread Robin Fourcade
zzaclub.fr/* Is that what you meant ? Because the problem is still there. :/ -- Thanks Timothy, I'll check the link you gave me. :) Thanks again, Robin -- You received this message because you are subscribed to the Google Groups "

Re: Django on CentOS

2015-11-10 Thread Robin Fourcade
Thanks James, I looked at many tutorials like: https://www.digitalocean.com/community/tutorials/how-to-install-the-django-web-framework-on-centos-7 https://devops.profitbricks.com/tutorials/deploy-django-with-virtualenv-on-centos-6/ Neither of these are for python 3.7 or higher. :/ i would gladly

Re: Django on CentOS

2015-11-11 Thread Robin Fourcade
orial line after line, just to test (no even with my own project). Thanks again, Robin. Le mercredi 11 novembre 2015 10:04:44 UTC+1, James Schneider a écrit : > > > On Nov 10, 2015 9:46 AM, "Robin Fourcade" > wrote: > > > > Thanks James, > > I looked at many

Re: Django on CentOS

2015-11-11 Thread Robin Fourcade
Hi, thanks for your answer. That's what I did. So if it's a big issue, I'll create a new user on my server and I'll redo the installation through this user ! Thanks, Robin. -- You received this message because you are subscribed to the Google Groups "Django users&qu

Re: Django on CentOS

2015-11-11 Thread Robin Fourcade
y Thanks again, Robin. -- 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, send e

DoesNotExist: Group matching query does not exist.

2015-11-11 Thread Robin Fourcade
thod return getattr(self.get_queryset(), name)(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 334, in get self.model._meta.object_name DoesNotExist: Group matching query does not exist. Can someone help me ? Thanks, Robin. --

Re: Django on CentOS

2015-11-11 Thread Robin Fourcade
Riiigghh, After many many many tries, it finally worked ! Thanks again, thank you, everybody! Robin. -- SOLVED. -- 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, sen

Re: DoesNotExist: Group matching query does not exist.

2015-11-12 Thread Robin Fourcade
Thanks for your reply, It was in the DB but, I don't know why, I had this issue. I made the migration a second time and this time, it worked. Thanks, Robin. -- Solved. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

Re: Timer for online examination

2015-11-16 Thread Robin Lery
Hello, I think you will have to implement jquery/javascript to make the timer. After the countdown finishes js can post the form automatically. Cheers. On Tue, Nov 17, 2015 at 1:11 PM, Jani Tiainen wrote: > Hi, > > If you're looking something magical there isn't anything. Just declare > expira

Re: Timer for online examination

2015-11-17 Thread Robin Lery
t; example). So even someone manages to hack the js (which is really simple) > they can't overcome limitation from the server. > > Like the rule #1 in web development says - "Never trust user input". > > > On 17.11.2015 09:47, Robin Lery wrote: > > Hello, > I

Display the form errors in the django template with ajax post

2015-12-24 Thread Robin Lery
I have a contact form through which users would be able to contact me. I am using django with ajax, and it works fine *if* there's no error. I would like to show the errors if there's any like it displays above the input fields and not just the errors, but both the input and the errors. It does how

Re: Merry Xmass

2015-12-25 Thread Robin Lery
Merry Christmas! On Fri, Dec 25, 2015 at 3:09 AM, Andrea Mucci wrote: > Merry Xmass to all and all your family > Have a good djangoized new year > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and sto

Display form errors above its respective field with ajax

2015-12-27 Thread Robin Lery
I have a contact form through which users would be able to contact me. I am using django with ajax, and it works fine if there's no error. I would like to show the errors if there's any like it displays above the input fields and not just the errors, but both the input and the errors. It does howev

default groups and permissions

2019-01-06 Thread Robin Riis
i have a custom user model that i want to have 4 default groups depending on job title. this is my model.py 1 from django.contrib.auth.models import AbstractUser, UserManager, PermissionsMixin 2 from django.db import models 3 4 class WiggenUserManager(UserManager): 5 pass 6 7

[Django + Heroku] Timeout when receiving a request

2021-05-21 Thread Robin Bonnin
happen? And why only in certain cases? Thank you very much for the help! Robin Bonnin -- 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 djang

Re: Django books

2024-01-30 Thread Marcelo Robin
https://dokumen.pub/qdownload/django-for-beginners-build-websites-with-python-and-django-1st-edition-1983172669-9781983172663.html El lun, 29 ene 2024 a la(s) 10:01 p.m., AshiQul Islam Munna ( ashiq.cse.m...@gmail.com) escribió: > Can I get the 'Django for Beginners Build websites with Python and

Django Slick Reporting Dashboard

2024-02-16 Thread Rupert Robin
I have a Slick-Reporting Dashboard with 4 reports. The dashboard rendering of the ReportView reports using the get_widget_from_url method does not include the Filter and Export CSV options. These options DO render when the report is called directly into a single page view. Is there a way of inc

Slick Reporting Dashboard

2024-02-16 Thread Rupert Robin
I am have a slick-reporting dashboard with 4 reports. However, the filters and CSV export options do not appear in the dashboard rendering of the ReportView(s). When a single report view is called directly, now the Filter and Export CSV options are shown. How can I get the Filters and Export CSV

Loop through QuerySet in Django

2022-11-02 Thread Marcelo A. Robin
I have a processors.py file where I generate a context processor to load static data into my project's base template. I have posts and I want to generate as a kind of archive in a aside, where you can access through a link, the posts that were created in the month of August 2022 (for example) a

Django-allauth & Facebook login

2023-04-01 Thread Marcelo A. Robin
Hi, I'm trying to use django-allauth to create a facebook login system. i managed to get it all done but in my local test i get an error where facebook tells me my app path is not safe. I understand that my http://localhost is missing the https://localhost. this is so ? How can I add https

RE: Complex query reduction

2013-11-03 Thread Robin St . Clair
Hi You are running into typical production Django problems - works fine in testing, terrible in production. Firstly If you use attributed many-to-manys, create the table outside of Django and use raw SQL.Create a primary key on the two things being related (usually larger table first). Multi-colu

Re: Complex query reduction

2013-11-07 Thread Robin St . Clair
backend? What has changed to cause you to prefer the use of the IN statement? R+C On 08/11/2013 05:55, akaariai wrote: On Sunday, November 3, 2013 1:48:07 PM UTC+2, Robin St.Clair wrote: *IN* * if using Django avoid the IN operation at all costs If there are potentially more than 15

Re: settings.py work in local but not on the server

2019-02-06 Thread robin . leroux . 96
Thank you both for yours answers. Gil : I checked again using ftp, git pushed everything correctly, so the error don't come from that. Jeremy : I tried to comment the application in wsgi.py, nothing changed server-side #application = get_wsgi_application() Doing this, I saw that appear (cf bol

<    1   2   3