Re: newbie

2022-01-28 Thread machine learning
very academy had helped me a lot. I think this will be beneficial for you also. On Fri 28 Jan, 2022, 9:04 PM muwaga micheal, wrote: > Django is a good framework to learn. Its easy and has a great community to > help. > There are good videos on YouTube. > > On Thursday, January 27, 2022 at 5:10:5

Re: newbie

2022-01-28 Thread muwaga micheal
Django is a good framework to learn. Its easy and has a great community to help. There are good videos on YouTube. On Thursday, January 27, 2022 at 5:10:56 PM UTC+3 jmizpaha...@gmail.com wrote: > It's easy if you get the Python basics first. > Suggest having a good grasp of Python basic conce

Re: newbie

2022-01-27 Thread John Dollosa
It's easy if you get the Python basics first. Suggest having a good grasp of Python basic concepts then you jump to learning Django. There's a lot of things Django can offer, you just need to understand them before to jump to other topics :) On Thursday, 27 January 2022 at 22:02:42 UTC+8 me.

Re: Newbie of django

2021-12-13 Thread Marmik Patel
Pycharm is a good option if you want to login to your VPS by ssh, but still it is in beta mode. When it comes to deploy the django site, it's little bit tricky. You can use external proxy parser like gunicorn or uWSGI and use them with Apache or nginx. Marmik On Monday, 13 December 2021 at 19:

Re: Newbie question

2021-06-07 Thread Lalit Suthar
try form.save(commit=False) On Mon, 7 Jun 2021 at 22:10, Moose Smith <47kanga...@gmail.com> wrote: > I have a table which holds simple data like addresses. Created a form > which displays the records in the form and allows the user to select a > record "address" to edit. > > I want this edit fun

Re: Newbie looking for some help with Postgres <> Django connection

2020-11-09 Thread Marc Johnson
Hi David, Thanks again for the input. I havent quite figured it out yet but I appreciate the help! Best, Marc On Thu, Nov 5, 2020 at 8:02 AM David Nugent wrote: > > > On 5 Nov 2020, at 04:11, Marc Johnson wrote: > > Hi David, > > Thanks again for the feedback. When I remove the 'ENGINE' varia

Re: Newbie looking for some help with Postgres <> Django connection

2020-11-05 Thread David Nugent
On 5 Nov 2020, at 04:11, Marc Johnson mailto:marcjohnson...@gmail.com>> wrote: Hi David, Thanks again for the feedback. When I remove the 'ENGINE' variable I get the error saying settings.DATABASES is improperly configured, as shown in the snapshot attached below. But when I add the ENGINE

Re: Newbie looking for some help with Postgres <> Django connection

2020-11-03 Thread David Nugent
On 4 Nov 2020, at 03:45, Marc Johnson mailto:marcjohnson...@gmail.com>> wrote: ... 1. Since this app is dockerized, I have my existing env vars in my docker-compose-prod.yml file. Is that where I should list DATABASE_URL? Like: db: image: postgres:11 volumes: - postgres_data:/var/l

Re: Newbie looking for some help with Postgres <> Django connection

2020-11-03 Thread Marc Johnson
Hi David, Thanks for the feedback! I'm checking out dj_database_url and have a few follow up questions I was hoping you (or someone) could help me with. 1. Since this app is dockerized, I have my existing env vars in my docker-compose-prod.yml file. Is that where I should list DATABASE_URL? Like

Re: Newbie looking for some help with Postgres <> Django connection

2020-10-31 Thread David Nugent
It's been a while since I used heroku, but iirc it just uses a formatted pg url. Install the module dj-database-url and use this in settings instead of the default DATABASES layout, something like: DATABASES = { 'default': dj_database_url.config(os.environ['DATABASE_URL'], conn_max_age=1800

Re: NEWBIE

2019-07-09 Thread vineet daniel
First of all its Django and not Gjango and rather than getting mastery over a framework in two months Id suggest that you start with python or any programming language which has OOPs. If you are not sure what that is then start from very basic of programming. There is no shortcut to success. Have p

Re: NEWBIE

2019-07-09 Thread Jani Tiainen
And to give some perspective I have been working with Django @work last 10 years and I'm still far from mastering it. I'm pretty good with Django though. In other words it really takes a lot. Interns at work do get hang of basics in about two months but really them to get up to speed takes somewhe

Re: NEWBIE

2019-07-09 Thread Javier Rivera
If you have no previous programing experience, a miracle. If you are already proficient with Python two months are enough to get comfortable with Django, but you will likely still be far from mastery. Best regards, Javier. O 09/07/19 ás 11:34, Afotro Ben escribiu: Hello,i am new to programmin

Re: Newbie question : running the makemigrations command in the terminal

2019-03-30 Thread kamibarut609
@jgi...@caktusgroup.com Thank you for your help, I received some help on Stackoverflow. @ Krishna Tulsyan Thank you for your help, I received some help on Stackoverflow. On Friday, 29 March 2019 12:37:05 UTC+1, Krishna Tulsyan wrote: > > Hi, > can you provide the folder structure of your app, a

Re: Newbie question : running the makemigrations command in the terminal

2019-03-29 Thread Krishna Tulsyan
Hi, can you provide the folder structure of your app, and apps.py file ensure that the name of the app is 'munichlivin_app' and name of the class in apps.py is 'MunichLivingConfig' On Thursday, March 28, 2019 at 9:05:46 PM UTC+5:30, kamiba...@gmail.com wrote: > > Hello, > > (Newbie here): I am t

Re: Newbie question : running the makemigrations command in the terminal

2019-03-28 Thread jgibson
>From your settings file: > munichliving_app.apps.MunichLivingConfig > > That makes me think that the structure of your project looks something like this: \munichliving_app\manage.py \munichliving_app\apps\MunichLivingConfig\ \munichliving_app\apps\MunichLivingConfig\models.py \munichliving_ap

Re: Newbie question : running the makemigrations command in the terminal

2019-03-28 Thread kamibarut609
On Thursday, 28 March 2019 16:35:46 UTC+1, kamiba...@gmail.com wrote: > > Hello, > > (Newbie here): I am trying to run the makemigrations icommand in my > terminal. You will find here below the three relevant files, the third one > showing the errors displayed in > the terminal. > > My settin

Re: Newbie : Object copy - weird error :-)

2018-07-13 Thread mickael . barbo
Thanks you Melvyn, this is it :-) Have a nice day. Regards Le mardi 3 juillet 2018 00:34:14 UTC+2, Melvyn Sopacua a écrit : > > On vrijdag 29 juni 2018 09:44:40 CEST Mickael Barbo wrote: > > > > > I try to create a way to archive (copy) the same object instance on an > > > other DataBase. > >

Re: Newbie : Object copy - weird error :-)

2018-07-02 Thread Melvyn Sopacua
On vrijdag 29 juni 2018 09:44:40 CEST Mickael Barbo wrote: > I try to create a way to archive (copy) the same object instance on an > other DataBase. > > I followed this advice : # https://stackoverflow.com/ > questions/21699707/python-how-to-copy-all-attibutes-from- > base-class-to-derived-one

Re: Newbie : Object copy - weird error :-)

2018-06-29 Thread Mickael Barbo
Hello Julio, Ok, I see. I try to create a way to archive (copy) the same object instance on an other DataBase. I followed this advice : # https://stackoverflow.com/ questions/21699707/python-how-to-copy-all-attibutes-from- base-class-to-derived-one 2018-06-27 14:56 GMT+02:00 Julio Biason : >

Re: Newbie : Object copy - weird error :-)

2018-06-29 Thread Mickael Barbo
Hi 赖信桃, Sorry for formating problem. Here it is class AbstractDataModel(models.Model): xxx class Meta: abstract = True def __iter__(self): return iter([self.xxx, self.yyy, self.zzz, self.aaa, self.qqq, self.mode_bbb]) class DataModel(AbstractData

Re: Newbie : Object copy - weird error :-)

2018-06-27 Thread Julio Biason
Hi Mikael, The problem is happening because of this: __init__() takes from 1 to 2 positional arguments but 11 were given On your new __init__(), you added just 2 parameters: `self` and `source`. But you overwrote the default `models.Model` init, which receives way more parameters (the original si

Re: Newbie : Object copy - weird error :-)

2018-06-26 Thread 赖信桃
Can you format your code or post it on a gist? On Wed, Jun 27, 2018 at 00:17 wrote: > Hi all :-) > > I'd like to archive some data. > > I did that : > > class AbstractDataModel(models.Model): > > xxx > > > class Meta: > abstract = True > > > def __iter__(self): > > return iter([se

Re: Newbie : Object copy - weird error :-)

2018-06-26 Thread mickael . barbo
Error typo, I creates a new thread with the good description ;-) Le mardi 26 juin 2018 16:35:27 UTC+2, Nelson Varela a écrit : > > The following class is kinda weird: > class DataModel(DataModel): > > A class which inherits itself??? > > > > On Tuesday, June 26, 2018 at 11:31:24 AM UTC+2, mickae..

Re: Newbie : Object copy - weird error :-)

2018-06-26 Thread Nelson Varela
The following class is kinda weird: class DataModel(DataModel): A class which inherits itself??? On Tuesday, June 26, 2018 at 11:31:24 AM UTC+2, mickae...@gmail.com wrote: > > Hi all :-) > > I'd like to archive some data. > > I did that : > > class AbstractDataModel(models.Model): > xxx > > cla

Re: Newbie : Best data archive strategy

2018-06-12 Thread Mickael Barbo
>> >> It saves a copy of each record every time a record is changed. But it is >> saved in a separate table, so it doesn’t change your model’s table. >> >> >> >> *From:* django-users@googlegroups.com [mailto:django-users@googlegro >> ups.com] *On B

Re: Newbie : Best data archive strategy

2018-06-12 Thread Gerardo Palazuelos Guerrero
; > *From:* django-users@googlegroups.com [mailto:django-users@ > googlegroups.com] *On Behalf Of *mickael.ba...@gmail.com > *Sent:* Tuesday, June 12, 2018 1:17 PM > *To:* Django users > *Subject:* Re: Newbie : Best data archive strategy > > > > Thanks Matthew for your re

RE: Newbie : Best data archive strategy

2018-06-12 Thread Matthew Pava
1:17 PM To: Django users Subject: Re: Newbie : Best data archive strategy Thanks Matthew for your response. I looked at Reversion. If I understand correctly what it did, it duplicate each transaction on internal database ? Le mardi 12 juin 2018 20:01:02 UTC+2, Matthew Pava a écrit : I think what

Re: Newbie : Best data archive strategy

2018-06-12 Thread mickael . barbo
Thanks Matthew for your response. I looked at Reversion. If I understand correctly what it did, it duplicate each transaction on internal database ? Le mardi 12 juin 2018 20:01:02 UTC+2, Matthew Pava a écrit : > > I think what you’re really looking for is an audit log. There are some > Django

RE: Newbie : Best data archive strategy

2018-06-12 Thread Matthew Pava
I think what you’re really looking for is an audit log. There are some Django packages available that do that automatically. You might find this one quite helpful, called Django Reversion: https://github.com/etianen/django-reversion From: django-users@googlegroups.com [mailto:django-users@goog

Re: Newbie - Microservice in Django - Best place to start learning

2018-02-02 Thread Paul Tiplady
Assuming you're trying to build a REST API and not a HTML website, you should look at http://www.django-rest-framework.org/ as it provides a lot of djangonic convenience methods for building REST APIs with the Django ORM. On Thursday, February 1, 2018 at 9:16:47 AM UTC-8, pratibha sharma wrote:

Re: Newbie : Help for using RequestContext

2018-01-10 Thread mickael . barbo
Oh, *Thank you Andréas for your kind attention and your reactivity.* Nice, I didn't know about request.session... And thanks to you, *now I Know* :-) Just for archive, I found a way with context_processors here (old django version, but I adapt to django 2) : http://apprendre-python.com/page-dja

Re: Newbie : Help for using RequestContext

2018-01-10 Thread Andréas Kühne
Hi Micka, And welcome to django. Regarding how to add things in middleware - you can add the information to the session like this: class SimpleBreadcrumbs(object): def __init__(self, get_response): self.get_response = get_response # One-time configuration and initialization.

Re: Newbie question, start server with hostname

2017-02-08 Thread Dylan Reinhold
You don't include the http:// python manage.py runserver hostname:8000 or put the IP address in the hostname area/ Dylan On Wed, Feb 8, 2017 at 12:29 PM, hippohippo wrote: > Dear all, > > I am a new comer on Django. I was able to to run start server by command > as below yesterday. > > python m

Re: Newbie question - data structure for game

2016-10-30 Thread Derek
You'll probably need jQuery. Bear in mind "size" is not absolute as it will depend on font family and font height. On Sunday, 30 October 2016 01:27:59 UTC+2, Ken Albright wrote: > > Sounds good. Thanks for the advice. Now if I could only figure out how to > get forms to expand and contract to ma

Re: Newbie question - data structure for game

2016-10-29 Thread Stephanie&stephan Statsmann
K -- 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 email to django-users@googlegroups.com.

Re: Newbie question - data structure for game

2016-10-29 Thread Ken Albright
Sounds good. Thanks for the advice. Now if I could only figure out how to get forms to expand and contract to match the size of the quote... Thanks. On Friday, October 28, 2016 at 5:00:14 PM UTC-7, Ken Albright wrote: > > I'm just learning Python and Django so please be gentle... > > I've writte

Re: Newbie question - data structure for game

2016-10-29 Thread Yaşar Arabacı
I am also quite new to django, but I will go with something like this; class Quote(models.Model): quote= models.CharField(max_length=100) class EncryptedQuote(models.Model) quote = models.ForeignKey(Quote, on_delete=models.CASCADE) encrypted_quote = models.CharField(max_length=100)

Re: Newbie question - data structure for game

2016-10-29 Thread Bob Gailer
On Oct 28, 2016 7:59 PM, "Ken Albright" wrote: > > I'm just learning Python and Django so please be gentle... > > I've written a quote decryption game (like you see in the newspaper) in Python. I'd like to put it on a web page with Django. However, I'm not sure of the best way to structure the dat

Re: Newbie to Novice – Using Admin DateTime Picker in your Form

2016-09-19 Thread Mayank Rungta
I am looking at making custom forms look like Django admin forms with the widgets in place. Also, I like to do a similar thing for displaying tables. I used a combination of plugins for sorting, filters and displaying tables with pagination. The result was not as good. What I am hoping is to find a

Re: Newbie to Novice – Using Admin DateTime Picker in your Form

2016-09-19 Thread Nate Granatir
Just realized this thread was not necessarily about filters for the admin; in the case of using custom forms/views Django daterange filter may not be a good option. On Thursday, March 19, 2009 at 8:37:56 AM UTC-5, Paul Nema wrote: > > I've noticed many people new to Django (and sometimes also ne

Re: Newbie to Novice – Using Admin DateTime Picker in your Form

2016-09-19 Thread Nate Granatir
I just installed Django Daterange Filter 1.3.0 (https://github.com/DXist/django-daterange-filter) on a Django 1.9 project. Took a little CSS fiddling to get it to display properly with Grappelli, but other than that it worked like a charm. Nate On Thursday, March 19, 2009 at 8:37:56 AM UTC-5,

Re: Newbie to Novice – Using Admin DateTime Picker in your Form

2016-09-18 Thread Mayank Rungta
Most of the posts I see around this topic are dated. I was wondering if this works for Django 1.8 upwards. Kindly let know if anybody has tried/tested any of these approaches on a more recent version of Django. I would like to stick to this approach rather than figure a plugin/javascript for ev

Re: Newbie question regarding uninstalling Django system-wide.

2016-07-13 Thread Leo
Thanks Mike On Tuesday, July 12, 2016 at 8:03:18 PM UTC-4, Mike Dewhirst wrote: > > On 13/07/2016 1:55 AM, Leo wrote: > > I am learning how to use Django. With my first attempt I did not use a > > virtual environment instead installed Django system-wide. Now I have > > learned to utilize virtua

Re: Newbie question regarding uninstalling Django system-wide.

2016-07-12 Thread Mike Dewhirst
On 13/07/2016 1:55 AM, Leo wrote: I am learning how to use Django. With my first attempt I did not use a virtual environment instead installed Django system-wide. Now I have learned to utilize virtual environments. Can you help me learn how to uninstall the system-wide Django instance? Also, I ca

Re: (Newbie) Stuck with annotate() docs

2016-04-28 Thread Ankush Thakur
Yup! Makes sense now. I hope it saves someone some trouble someday. :-) Thanks a lot, Tim! Best, Ankush On Thursday, April 28, 2016 at 12:21:35 AM UTC+5:30, Tim Graham wrote: > > Please give this a try: https://github.com/django/django/pull/6524 > > On Wednesday, April 27, 2016 at 10:45:03 AM UT

Re: (Newbie) Stuck with annotate() docs

2016-04-27 Thread Tim Graham
Please give this a try: https://github.com/django/django/pull/6524 On Wednesday, April 27, 2016 at 10:45:03 AM UTC-4, Ankush Thakur wrote: > > I'm not sure how Book.objects.first().chapters is different > from Book.objects.first().chapters.count(), but the point is that > "chapters" is not defin

Re: (Newbie) Stuck with annotate() docs

2016-04-27 Thread Ankush Thakur
I'm not sure how Book.objects.first().chapters is different from Book.objects.first().chapters.count(), but the point is that "chapters" is not defined in the models at the top of that page! The snippet makes sense if I treat Book.chapters as another ManyToManyField (like authors), but it's rea

Re: (Newbie) Stuck with annotate() docs

2016-04-26 Thread Tim Graham
Looks like a typo. Does the rest of the example make sense and work if that line is changed to "Book.objects.first().chapters"? On Tuesday, April 26, 2016 at 12:50:31 PM UTC-4, Ankush Thakur wrote: > > Folks, I'm having exceptional trouble understanding annotate(), > aggregate(), and their vario

Re: [newbie] import error after restart (virtualenv)

2015-09-20 Thread Vijay Khemlani
Aren't tests supposed to run with "python manage.py test lists"? On Fri, Sep 18, 2015 at 8:55 PM, David wrote: > Dear Django experts, > > I am reading through Harry Percival's "Test-Driven Development with > Python". > > As I finished chapter 3 yesterday, I was fully on track, perfectly > aligne

Re: Newbie

2015-08-02 Thread Sergiy Khohlov
Welcome aboard 2 серп. 2015 16:38 "Matthew Yankey" пише: > Hi, matthew here. > > I just started reading about django. hope to learn from this group as well. > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from

Re: Newbie: Saving User and UserProfle from same template

2015-08-02 Thread sarfaraz ahmed
It worked for me!! Please review my code... and let me know if I have done everything correct...!! On Sun, Aug 2, 2015 at 12:25 PM, sarfaraz ahmed wrote: > Changed the edit_user to following. it works fine except... newly added > field date_of_birth does not load data. > Please take a look a

Re: Newbie: Saving User and UserProfle from same template

2015-08-01 Thread sarfaraz ahmed
Changed the edit_user to following. it works fine except... newly added field date_of_birth does not load data. Please take a look at link below http://pastebin.com/nXpiLMJp Regards, Sarfar

Re: newbie question

2015-03-20 Thread Tom Lockhart
> The Python functions I wish to execute use numpy and other Python packages I > would like like to convert to JavaScript. As has been suggested, the tutorial is where you want to start. By the time you finish part 4 you will have a good idea how to bypass references to a data model and use for

Re: newbie question

2015-03-20 Thread Vincent Davis
On Friday, March 20, 2015, john wrote: > Maybe another way to reply to your question is to break down how it would > work normally. > There are two sides of this question - the server side and the client side. > > In general client side stuff is done in javascript. > Server side requests are don

Re: newbie question

2015-03-20 Thread john
Maybe another way to reply to your question is to break down how it would work normally. There are two sides of this question - the server side and the client side. In general client side stuff is done in javascript. Server side requests are done in python. So you have to decide where you want

Re: newbie question

2015-03-20 Thread VMD
On Friday, March 20, 2015 at 11:09:57 AM UTC-6, David Gleba wrote: > > > You don't actually need python or django to get form input and do > something with the input. > My function is not as simple as adding two numbers and for various reasons I am not interested in using Javascript. I just use

Re: newbie question

2015-03-20 Thread john
I'm not aware that you can use javascript in views.py. In the Template - I believe you mean. Johnf On 03/20/2015 09:35 AM, David Gleba wrote: Also, I am not an expert in Django yet, but I think you can use html and javascript in views. -- You received this message because you are subscribed

Re: newbie question

2015-03-20 Thread David Gleba
I will try to answer your question here another way. I searched google for: form to add two numbers I see: http://stackoverflow.com/questions/14496531/adding-two-numbers-using-javascript This example uses an HTML form and javascript to perform the task on the input. You don't actually need p

Re: newbie question

2015-03-20 Thread VMD
On Friday, March 20, 2015 at 9:58:23 AM UTC-6, David Gleba wrote: > > Does part 3 of the tutorial cover how to make a form, get the values > without storing them in a database, perform the arithmetic and then display > the result? I didn't see that in there. > I don't what to store them in a da

Re: newbie question

2015-03-20 Thread David Gleba
Does part 3 of the tutorial cover how to make a form, get the values without storing them in a database, perform the arithmetic and then display the result? I didn't see that in there. On Thursday, March 19, 2015 at 11:58:14 AM UTC-4, Andrew Farrell wrote: > > The other commenters are right tha

Re: newbie question

2015-03-19 Thread Andrew Farrell
The other commenters are right that reading the tutorial is a good use of your time. https://docs.djangoproject.com/en/1.7/intro/tutorial03/ is the section relevant to your question. On Thu, Mar 19, 2015 at 10:39 AM, Javier Guerra Giraldez wrote: > On Wed, Mar 18, 2015 at 9:41 PM, VMD wrote: >

Re: newbie question

2015-03-19 Thread Javier Guerra Giraldez
On Wed, Mar 18, 2015 at 9:41 PM, VMD wrote: > I have skimmed the tutorial and didn't find (notice) the answer. Why not > point me to an answer to my question? that's exactly the point. your question assumes Django works in some specific way, and there should be a simple answer for a simple need

Re: newbie question

2015-03-19 Thread VMD
On Wednesday, March 18, 2015 at 12:51:22 PM UTC-6, Avraham Serour wrote: > > short - use a view > > follow the tutorial, yes you will learn how to store and retrieve values > from a database, and I understand that you don't need that yet but the > tutorial is very brief, you won't waste your time

Re: newbie question

2015-03-18 Thread Avraham Serour
short - use a view follow the tutorial, yes you will learn how to store and retrieve values from a database, and I understand that you don't need that yet but the tutorial is very brief, you won't waste your time with advanced topics you don't need On Wed, Mar 18, 2015 at 8:08 PM, VMD wrote: >

Re: Newbie question: How to avoid a very long view function?

2015-01-19 Thread Cheng Guo
Thank you Daniel, I didn't know this! I am going to lookup how to use session. Thanks! On Monday, 19 January 2015 17:13:10 UTC+8, Daniel Roseman wrote: > > On Monday, 19 January 2015 07:28:14 UTC, Cheng Guo wrote: >> >> Hello, >> >> I am new to Django and I have run into an issue with views.py.

Re: Newbie question: How to avoid a very long view function?

2015-01-19 Thread Cheng Guo
Hello James: Thank you very much for spending the time reading and answering this question, really appreciated! I complete understand your suggestion of overriding the "save" method in the "UploadFile" to generate the id before saving. Thank you for pointing this out. On the other hand, I rea

Re: Newbie question: How to avoid a very long view function?

2015-01-19 Thread Cheng Guo
Hello James: Thank you very much for spending the time reading and answering this question, really appreciated! I complete understand your suggestion of overriding the "save" method in the "UploadFile" to generate the id before saving. Thank you for pointing this out. On the other hand, I rea

Re: Newbie question: How to avoid a very long view function?

2015-01-19 Thread Daniel Roseman
On Monday, 19 January 2015 07:28:14 UTC, Cheng Guo wrote: > > Hello, > > I am new to Django and I have run into an issue with views.py. I > understand that there is a function behind each view. For a view that I am > currently writing, it accepts a file upload from user and stores the file > on

Re: Newbie question: How to avoid a very long view function?

2015-01-19 Thread James Schneider
I wouldn't decorate them as class methods. You would want to call them from the objects themselves. For the save_to_disk() method, I was actually referring to the Django save() method ( https://docs.djangoproject.com/en/1.7/topics/db/models/#overriding-predefined-model-methods ). As you have it no

Re: Newbie question: How to avoid a very long view function?

2015-01-19 Thread Cheng Guo
So in my case, I need to generate a unique id for the file and save it to disk. I have a model called UploadFile, so you recommend to add two class methods to the UploadFile model, like the following? class UploadFile(models.Model): @classmethod def generate_id(): pass @cla

Re: Newbie question: How to avoid a very long view function?

2015-01-19 Thread James Schneider
I second moving some (or most) of the functionality to models.py. For instance, calculating the SHA value should be done as part of the model's save() function, not done in the view. Convention dictates that the only code that is placed in the view itself should be logic related to prepping the te

Re: Newbie question: How to avoid a very long view function?

2015-01-19 Thread Cheng Guo
Great, thanks! On Monday, 19 January 2015 15:46:40 UTC+8, Mike Dewhirst wrote: > > On 19/01/2015 6:28 PM, Cheng Guo wrote: > > Hello, > > > > I am new to Django and I have run into an issue with views.py. I > > understand that there is a function behind each view. For a view that I > > am cu

Re: Newbie question: How to avoid a very long view function?

2015-01-19 Thread Cheng Guo
Great, thanks! -- 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 email to django-users@goo

Re: Newbie question: How to avoid a very long view function?

2015-01-19 Thread Daniel França
If the operations are model related, why don't move some of those functions to models.py. On Mon 19 Jan 2015 at 08:46 Mike Dewhirst wrote: > On 19/01/2015 6:28 PM, Cheng Guo wrote: > > Hello, > > > > I am new to Django and I have run into an issue with views.py. I > > understand that there is a

Re: Newbie question: How to avoid a very long view function?

2015-01-18 Thread Mike Dewhirst
On 19/01/2015 6:28 PM, Cheng Guo wrote: Hello, I am new to Django and I have run into an issue with views.py. I understand that there is a function behind each view. For a view that I am currently writing, it accepts a file upload from user and stores the file on the server. To do that, I need

Re: Newbie help - running django-admin.py produces empty mysite folder

2014-11-30 Thread Collin Anderson
Hi, Are there any error messages? Is there already an existing mysite folder? What method did you use to install django? Did you really install django 1.8, not 1.7? Collin On Thursday, November 27, 2014 10:15:51 AM UTC-5, David Pride wrote: > > Title says it all really. Have just installed D

Re: Newbie: How to implement a app/module, which I can include from my html?

2014-11-30 Thread Collin Anderson
Assignment tags are my favorite. @register.assignment_tag def get_categories(): return Category.objects.all() {% get_categories as categories %} {% for category in categories %} {{ category }} {% endfor %} Collin On Thursday, November 27, 2014 5:19:20 AM UTC-5, somecallitblues wrote: > > >

Re: Newbie: How to implement a app/module, which I can include from my html?

2014-11-27 Thread Mario Gudelj
https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#inclusion-tags here you go chief On 27/11/2014 8:04 pm, "ThomasTheDjangoFan" < stefan.eichholz.ber...@googlemail.com> wrote: > Oh ok. > > so it would be something like: > > in home.html > {% include 'category-list.html' %} > > in ca

Re: Newbie: How to implement a app/module, which I can include from my html?

2014-11-27 Thread ThomasTheDjangoFan
Oh ok. so it would be something like: in home.html {% include 'category-list.html' %} in category-lists.html {% load those_categories %} ? Am Donnerstag, 27. November 2014 09:55:50 UTC+1 schrieb James Bennett: > > The usual way would be to write a custom template tag that fetches the > objec

Re: Newbie: How to implement a app/module, which I can include from my html?

2014-11-27 Thread James Bennett
The usual way would be to write a custom template tag that fetches the objects and puts them into the template context. -- 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 ema

Re: Newbie question on serving static files from apache

2014-11-15 Thread Daniel Roseman
On Saturday, 15 November 2014 03:13:37 UTC, pythonista wrote: > > I am using django 1.7 and apache. > > I do not understand the instructions on the django tutorial. > > The files were delivered as expected in debug mode and locally from the > django web server. > > > Can someone provide me with a

Re: Newbie operational error with Django db tables

2014-11-12 Thread Collin Anderson
Hello, Very interesting. I wonder if the model isn't being noticed in syncdb because it's in models/downloads.py, and it's not referenced in models/__init__.py. Collin -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Newbie operational error with Django db tables

2014-11-07 Thread Mr. crazy
I have executed [1] and tried again but no luck, the issues persists I know that "downloads" table is missing yet I didn't in DionaraFR guithub anything regarding that table. That what specifically makes me wonder if I have to build that missing table

Re: Newbie operational error with Django db tables

2014-11-07 Thread Adailton Nascimento
The error that is giving and following this saying in your settings.py in APPS not contain the "downloads" or if you already have to add it only in the database, delete your database and run the shell [1]. or just run the command in the shell [1] I believe that updates the database without havi

Re: Newbie operational error with Django db tables

2014-11-06 Thread Mr. crazy
well, as I asid in my question I'm following at tutorial on the installation steps of my visualization tool, it does not sat anything about tables creation I have also checked the tool in github but I can't see anything there. and if I want to build t

Re: Newbie operational error with Django db tables

2014-11-06 Thread Adailton Nascimento
Mr.crazy whenever you add content to the model or form run syncdb will have to be added to the database. or delete your database, and run: python manage.py syncdb -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Re: Newbie operational error with Django db tables

2014-11-06 Thread donarb
On Thursday, November 6, 2014 6:31:08 AM UTC-8, Mr. crazy wrote: > well, > > That is totally true.This is the problem which I need to find it's > solution. > Do I have to make the table?? How? > I looked for the DB tables and I didn't find it-Maybe I did not searched > the correct place > > I

Re: Newbie operational error with Django db tables

2014-11-06 Thread Mr. crazy
well, That is totally true.This is the problem which I need to find it's solution. Do I have to make the table?? How? I looked for the DB tables and I didn't find it-Maybe I did not searched the correct place I need help On Thursday, November 6, 2014 9:04:05 PM UTC+8, Avraham Serour wrote:

Re: Newbie operational error with Django db tables

2014-11-06 Thread Avraham Serour
it looks like django is trying to access a table named downloads which doesn't seems to exists in the db On Thu, Nov 6, 2014 at 8:54 AM, Mr. crazy wrote: > Hello, > > I'm working in a project where I use DionaeaFR to visualize my data > collected by Dionaea and the tutorial >

Re: Newbie Question: Django Tutorial Part 4 - Exception Issue

2014-10-01 Thread Daniel Rus Morales
My pleasure ;) Enjoy coding! On 01 Oct 2014, at 22:04, zaiks0105 wrote: > Daniel, > > I appreciate your help. I got drifted away yesterday and got back to it > today. I found my mistake: a fricking typo. My polls/detail.html look for > 'error_message' while I spelt 'error_messge' in my views

Re: Newbie Question: Django Tutorial Part 4 - Exception Issue

2014-10-01 Thread zaiks0105
Daniel, I appreciate your help. I got drifted away yesterday and got back to it today. I found my mistake: a fricking typo. My polls/detail.html look for 'error_message' while I spelt 'error_messge' in my views.py. So the error msg was never shown though the page was redirected properly. Thank

Re: Newbie Question: Django Tutorial Part 4 - Exception Issue

2014-09-29 Thread Daniel Rus Morales
No, that’s not the cause, the lack of it would be. That line shows the content of ‘error_message' when it does exist and has a value other than None. But if you have it in your template the error must be somewhere else in your code. Must be a simple syntax mistake you didn’t notice, either in th

Re: Newbie Question: Django Tutorial Part 4 - Exception Issue

2014-09-29 Thread zaiks0105
I do. Is that line causing the behavior? On Monday, September 29, 2014 7:15:47 AM UTC-4, Daniel Rus Morales wrote: > > Hi Zaiks0105, > > Do you have the following line in "your polls/templates/polls/detail.html”? > > {% if error_message %}{{ error_message }}{% endif %} > > > On 29 Sep 2014, at 1

Re: Newbie Question: Django Tutorial Part 4 - Exception Issue

2014-09-29 Thread Daniel Rus Morales
Hi Zaiks0105, Do you have the following line in "your polls/templates/polls/detail.html”? {% if error_message %}{{ error_message }}{% endif %} On 29 Sep 2014, at 12:48, zaiks0105 wrote: > Hi, > > I am following Django official tutorial and have unanswered issue at part 4, > https://docs.djan

Re: Newbie question about Django and Python versions.

2014-09-08 Thread Andrey Consalter
Thanks Russ, that clarifies a lot! Nice to see guys like you helping newcomers! -- 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...@googlegr

Re: Newbie question about Django and Python versions.

2014-09-08 Thread Russell Keith-Magee
Hi Andrey, On Tue, Sep 9, 2014 at 4:30 AM, Andrey Consalter wrote: > Hi there, > > I've been studying programming with Python 2.7 and Django 1.6, and a few > days ago Django 1.7 was release and with it, the new tutorial that I had > just started. > What you guys would recommend? Keep working wit

Re: Newbie question about Django and Python versions.

2014-09-08 Thread Michael A. Martin
Is anyone else trying out 1.7? I do a jython manage.py runserver 8080 and then it seems to want to render but isn't. > On Sep 8, 2014, at 1:30 PM, Andrey Consalter wrote: > > Hi there, > > I've been studying programming with Python 2.7 and Django 1.6, and a few days > ago Django 1.7 was rele

Re: Newbie Stuck on Django Tutorial 3 - Django Template system

2014-07-28 Thread Chou Sunny
i had the same problem by just copying the text on the web, pasting on textedit, and saving it into html. when i open html by Xcode, you will see extra lines, more than the text on the web. simply re-edit html by Xcode, the problem is solved. -- You received this message because you are subscr

Re: Newbie: Complete environment setup(virtualenv, pip, eclipse, git...)

2014-07-22 Thread Babatunde Akinyanmi
On 22 Jul 2014 18:56, "Ezequiel" wrote: > > On Saturday, July 19, 2014 10:41:11 PM UTC-3, Martin Torre Castro wrote: >> >> Please could someone help with some piece of advice, pros and cons of every option. Just don't want to do something now I will regret in future. >> Thank you veeery much in ad

  1   2   3   4   5   6   7   8   9   >