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

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

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

Re: Using JavaScript to enumerate a dataset returned to a page.

2023-06-19 Thread Robin Riis
With vanilla js for(let i = 1; i < myArray.length; i += 1) { document.log("index: " + i); document.log(myArray[i] + "\n"); } Wrote this on my phone so may contain some fault, but a for-loop is sufficent. On Mon, Jun 19, 2023, 16:29 Lee Stevens wrote: > Helo, > > I have a dataset return

Re: Question re: input

2023-04-01 Thread Robin Riis
You can check out rabbitMQ if it can fit your needs. Theres a plugin in django that simplifies integration. On Sat, Apr 1, 2023, 19:06 o1bigtenor wrote: > On Sat, Apr 1, 2023 at 9:51 AM Robin Riis wrote: > > > > What kind of environment are we talking about? > >

Re: Adding extra registration fields to my user registration

2023-04-01 Thread Marcelo Robin
you can create an application called profile where in its models you can place all the fields you need to add about the user. This video explains how you can do it. https://youtu.be/R8EHCohLvbw El jue, 30 mar 2023 a la(s) 00:08, Ebenezer Otchere (swazyman1...@gmail.com) escribió: > I want to coll

Re: Question re: input

2023-04-01 Thread Robin Riis
What kind of environment are we talking about? But i guess you mean that you have a server in one location and multiple clients from diffrent locations that should be able to upload some kind of data to the server. SSH is great to connect to a remote machine in a secure manner. And scp to send fi

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: Loop through QuerySet in Django

2022-11-04 Thread Marcelo Robin
I have a problem El jue., 3 nov. 2022 16:40, subin escribió: > Please let me know if that is okay. > > On Wed, Nov 2, 2022 at 5:03 PM Marcelo A. Robin > wrote: > >> I have a processors.py file where I generate a context processor to load >> static data into my proj

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

Re: recursos premium en Django

2022-10-10 Thread Marcelo Robin
muchas gracias !!! ya los estoy siguiendo !!! El dom, 2 oct 2022 a la(s) 07:10, ASAMOAH EMMANUEL ( emmanuelasamoah...@gmail.com) escribió: > Hola compañeros desarrolladores, he configurado un canal privado en > telegram donde he puesto recursos premium. Los recursos cubren el > desarrollo web de

Re: How to approach

2021-11-04 Thread Robin Riis
i agree with kasper, but one tip is to start with the user class. check out django.contrib.auth.base_user Den tors 4 nov. 2021 kl 18:36 skrev Kasper Laudrup : > On 04/11/2021 14.54, Trippy Samurai wrote: > > Hi there, > > I am new to django and have a problem statement am not quite sure how to >

[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

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()

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

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
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)

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: 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

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 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: 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):

[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: 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

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: 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

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

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

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

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: 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: 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: 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

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: 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

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: 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 >

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

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

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

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 --

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 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:

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

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

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 >

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: 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

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

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: 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

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

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

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

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

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 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: 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

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: 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: 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

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
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

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
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-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-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-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-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
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-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

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: 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 *

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: 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: 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: 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: 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: 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

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: 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

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: Allow users to submit django form once per day

2015-07-23 Thread Robin Lery
You can save the datetime of the last form submission and check whether its oneday or not in the view. If its one day then show pass the form or else dont. Hope this helps. On 23 Jul 2015 20:38, "Nkansah Rexford" wrote: > I want to allow users to submit a django form once, and only once > everyd

Re: Thumbnails In Django

2015-07-21 Thread Robin Lery
Yes. I would like to add easy-thumbnails too. Both are great! On 22 Jul 2015 01:05, "Sadaf Noor" wrote: > In one of my projects I used sorl ( > https://github.com/mariocesar/sorl-thumbnail) instead, it was super easy > and best fit for my project. Every time it asks for a new thumbnail BUT > if i

Re: Celery to process task and modify the model fields

2015-07-14 Thread Robin Lery
rom... february I think, what's changed since > then? > > On Tue, Jul 14, 2015 at 3:29 PM, Robin Lery wrote: > >> I would like to convert video into mp4 using ffmpeg and celery for the >> asynchronous task. When user uploads a video, it will be for the >> original_video

Celery to process task and modify the model fields

2015-07-14 Thread Robin Lery
I would like to convert video into mp4 using ffmpeg and celery for the asynchronous task. When user uploads a video, it will be for the original_video and save it. After that I want celery to convert it into a different version for the mp4_720 field. However I am confused on how to apply that logic

Re: Add multiple objects of same model at the same time in admin

2015-06-15 Thread Robin Lery
; Cheers > > > > > > > On Sun, Jun 14, 2015 at 1:08 AM, Carlos Arturo Sanchez Rivera < > ing.c...@gmail.com> wrote: > >> It is easier with decorators >> >> @admin.register(Transfer) >> class TransferAdmin(admin.ModelAdmin): >>

Get the first image src from a post

2015-06-15 Thread Robin Lery
I have a model to write blogs. In that I'm using a wysiwyg editor for the Blog's descritpion, through which I can insert an image within the description. class Blog(models.Model): title = models.CharField(max_length=150, blank=True) description = models.TextField() pubdate = models.Dat

Add multiple objects of same model at the same time in admin

2015-06-13 Thread Robin Lery
I have a model to upload pictures: models.py: > class Snap(models.Model): > image = models.ImageField(upload_to=get_upload_file_name) > caption = models.CharField(max_length=150, blank=True, null=True) > date = models.DateField(default=date.today) > admin.py: class SnapAdmin(admin.

Re: Transcode video using celery and ffmpeg in django

2015-02-20 Thread Robin Lery
;title'] # Assuming the form field is >> "title" >> video.save() # You might need to make the mp4_480 and >> mp4_720 fields "nullable" on the model >> yourapp.tasks.transcode_video.delay(video) # Assuming the task is the >> "

Transcode video using celery and ffmpeg in django

2015-02-20 Thread Robin Lery
I would like to transcode user uploaded videos using celery. I think first I should upload the video, and spawn a celery task for transcoding. Maybe something like this in the tasks.py: subprocess.call('ffmpeg -i path/.../original path/.../output') > Just completed First steps with celery

Return to the requested page after successfull @login_required by the next variable

2015-01-08 Thread Robin Lery
Suppose this is the url after `@login_required(login_url='/accounts/required_login/')`: http://ngoksy.com/accounts/login_required/?next=/article/ view for the login_require: *def required_login(request):return render(request, 'required_login.html')* I tried adding 'next', like it [

Re: Guidance needed - Real time and django

2014-09-02 Thread Robin Lery
Thank you Amirouche! I will surely look onto that. And I saw many tutorials on django + node.js and socket.io, and was just curious as to what your thoughts are on this as the new version of socket.io has also been released? On Mon, Sep 1, 2014 at 3:09 AM, Amirouche Boubekki < amirouche.boube...@

Re: Feeling some serious timezone pain

2014-08-20 Thread Robin
GMT with the current time in Britain, after any adjustment for summer time. Robin St.Clair On 20/08/2014 13:32, Geoffrey S. Knauth wrote: |2014-08-30 16:00:00+00:00 GMT| |2014-08-30 12:00:00-04:00Toronto (Summer)| || ||This looks correct to me. Maybe you were expecting the timezone to be -05

Re: dba designer consulting needed

2014-08-15 Thread Robin
Mike I hope you find a local person who can do the job. If you need to get in touch, please do. Kind Regards Robin St.Clair PS I wouldn't mind an excuse to be in Melbourne first week in November On 15/08/2014 14:37, Mike Dewhirst wrote: Robin Thanks for responding ... I have a coup

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

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

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

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

Re: "Authenticating Users" where should I put the code?

2014-03-06 Thread Robin Lery
This should be in your views.py. On Thu, Mar 6, 2014 at 8:15 PM, Jack Yan wrote: > in the tutorial and section "Authenticating Users": > https://docs.djangoproject.com/en/1.6/topics/auth/default/ > > where can I put code: > > from django.contrib.auth import authenticateuser = > authenticate(us

  1   2   3   >