Hello,
I am newly learning django, and have decided to use pythonanywhere and
github for publishing/hosting my apps. I've been using php and mysql for a
few years and like mysql. But I need some help with the initial setup so
that everything works/clones smoothly between my app on my local
ub.com/andres-torres-marroquin/django-dropbox
>
>
> 2016-12-28 12:15 GMT-06:00 Alexander Joseph <alexander.v.jos...@gmail.com>
> :
>
>> I'm building a collection of apps that write custom .docx and .xlsx
>> files, and store them to a users account. These file
I'm building a collection of apps that write custom .docx and .xlsx files,
and store them to a users account. These files need to be in a specific
hierarchy and each user will have their own files/folders they can view and
edit. It would really be great if I could allow each user to sync their
en save becomes:
>
> def save(self, *args, **kwargs):
> if not self.id:
> today = datetime.date.today()
> date_str = datetime.datetime.strftime(today, '%y%m%d')
> doc_str = 'IN'
> self.invoice_number = doc_str + date_str +
&
Hello, I have an app for creating invoices, but I'd like to be able to save
a .docx of the invoice when the user creates the invoice (I'm using docx
library). I'm very new to django so any direction you can give I
appreciate. I'd like to know the proper way to go about doing this.
Right now I
invoice_number = date_str + new_invoice_num
> super(Invoice, self).save(*args, **kwargs)
>
>
> El dimarts, 25 juliol de 2017 6:23:44 UTC+2, Alexander Joseph va escriure:
>>
>> I'm new to django, but coming from php I think its the greatest thing
>> ever.
>&
I'm new to django, but coming from php I think its the greatest thing ever.
I have a model for Invoices ...
{{{
from django.conf import settings
from django.db import models
from django.core.urlresolvers import reverse
#from django.contrib.auth.models import User
# Create your models here.
Hello, I came across this error:
"*ValueError: invalid literal for int() with base 10:*" after I made a
field in my models.py a ForeignKey. Below is my models.py
from django.conf import settings
from django.db import models
from django.core.urlresolvers import reverse
from django.utils import
le. Thanks
On Wednesday, July 26, 2017 at 1:27:28 PM UTC-6, Tim Chase wrote:
>
> On 2017-07-26 11:52, Alexander Joseph wrote:
> > "*ValueError: invalid literal for int() with base 10:*" after I
> > made a field in my models.py a ForeignKey. Below is my models
I'm using {{ form.as_p }} in my template and would like to be able to use
placeholders in the individual input fields. Is there a way to do this?
Thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop
works the way its supposed to now.
On Wednesday, July 26, 2017 at 1:42:26 PM UTC-6, Alexander Joseph wrote:
>
> Hi, thanks for the reply, however when I take out the 'their_company'
> field altogether everything works fine. Also in the error it references the
> their_c
Perfect, thanks!
On Wednesday, July 26, 2017 at 2:41:52 PM UTC-6, Lee Hinde wrote:
>
> in the init method of your form do something like this:
>
> self.fields['verification_date'].widget.attrs["placeholder"] = 'date'
>
> > On Jul 26, 2017, at 1:31 PM, Alexander
wrote:
>
> On 26/07/2017 3:15 AM, Alexander Joseph wrote:
> > How did you learn all the methods that are available
>
> Django is very comprehensively documented and almost any question you
> can think up is only a google search away. Typically a search will
> revea
Good to know. Thanks again!
On Monday, July 24, 2017 at 10:23:44 PM UTC-6, Alexander Joseph wrote:
>
> I'm new to django, but coming from php I think its the greatest thing ever.
>
> I have a model for Invoices ...
>
> {{{
> from django.conf import settings
> from django
Hello,
I would like to remove the labels in my sign-in form and just have
placeholders in the text fields. Its working for my sing up form but for
some reason not for my sign-in form. Below is my forms.py, my views.py, and
my models.py. I think its because I'm using Django's auth view for the
igrations you
> shouldn't have any such problems. Migrations are tricky to understand but
> once you do they work flawlessly. The next time you have a problem give us
> some information with the exact error message so that we can explain what's
> wrong.
>
> Regards,
>
>
I'm bullding a larger django project and I'm starting to implement
cookiecutter django after reading through "2 Scoops of Django" but still
have some questions on structuring a project.
I've setup my project, we'll call it 'business_proj'. In business_proj I
started an app called
2017 at 11:10:01 AM UTC-6, Alexander Joseph wrote:
>
> I'm pretty new to django and I've been having problems with
> makemigrations/migrate and I wonder if Im doing things right.
>
> I'm using MySQL backend and after reading in the documentation a little it
> sounds like Postgre
I'm pretty new to django and I've been having problems with
makemigrations/migrate and I wonder if Im doing things right.
I'm using MySQL backend and after reading in the documentation a little it
sounds like Postgresql might make migrating more painless. Usually my
problems stem from changing
Hello,
My site is deployed on an ubuntu/nginx/gunicorn droplet on digitalOcean.
For some reason my static files are not updating after running
collectstatic. I have access to older static files but cant make updates to
static files and see them in production. It works as it should on my
, 2017 at 6:40:46 PM UTC-6, Alexander Joseph wrote:
>
> Hello,
>
> My site is deployed on an ubuntu/nginx/gunicorn droplet on digitalOcean.
> For some reason my static files are not updating after running
> collectstatic. I have access to older static files but cant make updates
It was my nginx configuration. I hadnt noticed the staticfiles directory
was pointing to the wrong place. Thanks for the help!
On Sunday, October 1, 2017 at 9:37:04 PM UTC-6, Alexander Joseph wrote:
>
> environ allows you to use environment variables in your settings files,
> heres
> active.
>
> Hope my answer helps you.
>
> Em sexta-feira, 25 de agosto de 2017 15:31:43 UTC-3, Alexander Joseph
> escreveu:
>>
>> I'm currently using django.contrib.auth for my user authentication which
>> works well for simple authentication/authorization
now if you need anymore info to help me out with this. Thanks in
advance
On Friday, August 25, 2017 at 12:25:00 PM UTC-6, Alexander Joseph wrote:
>
> Awesome, thanks James, thats exactly what I'm looking for. I'll try layout
> 1 first as you suggest
>
>
>
> On Wednesday, August 23
Thanks Eduardo, I will try that!
On Saturday, August 26, 2017 at 2:05:22 PM UTC-6, Eduardo Balbinot wrote:
>
> You could do like this: when the user signs in you create the user in the
> database and flags is_active as False, so the user won't be able to log in.
> In your extended User model
Hello, I'm trying to add some additional fields to the allauth signup form
(first_name and last_name). I'm thinking the best way to do this is to
create a allauth SignupForm subclass and add my own fields (very new to
django so please let me know if I'm going about this wrong)
I added
the engineering sub-apps i have now under an
engineering folder without any further hierarchy that would help as there
will also be HR, financial apps, administration apps, etc.
Thanks again
On Wed, Aug 23, 2017 at 5:28 PM, Alexander Joseph <
alexander.v.jos...@gmail.com> wrote:
> Thanks James, a
, 2017 at 3:57 PM, James Schneider <jrschneide...@gmail.com>
wrote:
>
>
> On Tue, Aug 22, 2017 at 12:37 PM, Alexander Joseph <
> alexander.v.jos...@gmail.com> wrote:
>
>> Thanks for all the advice.
>>
>> One more question - could project structure be c
Awesome, thanks James, thats exactly what I'm looking for. I'll try layout
1 first as you suggest
On Wednesday, August 23, 2017 at 7:49:05 PM UTC-6, James Schneider wrote:
>
>
>
> On Wed, Aug 23, 2017 at 4:40 PM, Alexander Joseph <alexander...@gmail.com
> > wrote:
&
I'm currently using django.contrib.auth for my user authentication which
works well for simple authentication/authorization but I'd like to expand
the registration/auth flow a little.
Right now with the default flow users go to the signup page, signup, then
are redirected to the login page
826
>
> The reason: https://github.com/pennersr/django-allauth/blob/
> master/allauth/account/forms.py#L197
>
> So, there is an import loop / inheritance problem: Allauth's SignupForm
> makes itself a child of your custom form and you're trying to become it's
> child.
>
>
> O
This website is great
https://pythonprogramming.net/
that guys one of the best teachers I've seen
Theres also a guy on youtube (Bucky Roberts?) whos a pretty good teacher
and has some good django tutorials to get you started. I think his channel
is called 'thenewboston'
I'd recommend
sers/CA%2Be%2BciUKFGrv62awj%2BuuSSuVaS9uYqVs2%2Brv%
> 3DJPsaxvmJGNTfg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2Be%2BciUKFGrv62awj%2BuuSSuVaS9uYqVs2%2Brv%3DJPsaxvmJGNTfg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>
> For more options, visit https:
o the `migrate`
> management
> command and it will roll back to the point including that migration.
>
> Once you freeze the model design, feel free to squash some or all
> migrations
> into one file if things got a little big.
>
>
> On Wed, Aug 30, 2017 at 12:16 AM, Alexande
I think getting a django project to work correctly on a shared hosting
account might be tricky. If you're open to switching hosting I've tried
PythonAnywhere, Heroku, and DigitalOcean and definitely recommend
DigitalOcean. I think the majority of django developers recommend
DigitalOcean too.
On Tuesday, August 29, 2017 at 3:35:21 PM UTC-6, James Schneider wrote:
>
>
>
> On Tue, Aug 29, 2017 at 7:13 AM, Alexander Joseph <alexander...@gmail.com
> > wrote:
>
>> I'm not specifying the app level, I'm just running "python manage.py
>> makemigrations --sett
, 'rb'),
headers=headers)
return response
Thanks again for your advice
On Friday, December 15, 2017 at 3:24:30 PM UTC-7, Erik Cederstrand wrote:
>
> > Den 15. dec. 2017 kl. 22.18 skrev Alexander Joseph <
> alexander...@gmail.com >:
> >
> > I'm still new to
I have an app that keeps a database of products and parts of products that
allows users to authenticate via their Office365 account. I'd like to track
all the changes all users make (create, update, delete), which I want to
make view-able by all users. It looks like there are a couple of
I followed this guide and got everything running smooth
https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04
Hope that helps
On Tuesday, December 12, 2017 at 10:37:26 AM UTC-7, Coqui wrote:
>
> I am trying to deploy to digital
1 PM UTC-7, Alexander Joseph wrote:
>
> I'm trying to use the PermissionRequiredMixin but I'm a little confused on
> how to use it. I keep getting an infinite redirect loop when the user tries
> to visit the page if they dont have the required permissions.
>
> Here is my view
>
&g
I'm trying to use the PermissionRequiredMixin but I'm a little confused on
how to use it. I keep getting an infinite redirect loop when the user tries
to visit the page if they dont have the required permissions.
Here is my view
from django.contrib.auth.mixins import LoginRequiredMixin,
I'm still new to django but I'm building an app that allows users to
authenticate through Office365. I'm using this -
https://github.com/Lamelos/django-allauth-office365
and I got users to be able to successfully sign in with office365 but I now
need users to be able to upload documents to the
Ah yes, timedelta, thats what I meant instead of deltadate haha. Thanks
again
On Saturday, May 12, 2018 at 1:00:29 PM UTC-6, Alexander Joseph wrote:
>
> I'm building a timesheet app for employees and would like the employees to
> be able to select a day of the week date based on what
I'm building a timesheet app for employees and would like the employees to
be able to select a day of the week date based on what the date was on
Monday.
ie. the user inputs the Monday date of the timesheet, then for each row
they need to fill out they can select the Day/Date for each day that
+ deltadate (2) and so on. Still
need to check if this does what I'm thinking it will though. I'll check out
baklabel too
On Sun, May 13, 2018, 6:47 PM Mike Dewhirst <mi...@dewhirst.com.au> wrote:
> On 13/05/2018 5:00 AM, Alexander Joseph wrote:
> > I'm building a timesheet ap
I found a tutorial for putting forms in modals that works but its not using
CBVs and I'd rather use CBVs. Here is the function that works...
def gaas_create(request):
form = GaasWaferDesignForm()
context = {'form': form}
html_form =
I've tried every tutorial on how to use modals with forms in django and
have basically got nowhere.
The latest one I tried is this one
https://dmorgan.info/posts/django-views-bootstrap-modals/
I seem to be running into the same problem with them though, which is I'm
not sure where to put the
I've posted this before but havent gotten any response. If more information
is needed let me know and I'll get you anything I can.
I basically want to use forms in Bootstrap 4 modals for my CRUD operations
but cant really find a good tutorial or references to work from. I'm newer
to Django
> I have done this and am happy to help, just give me some direction in
> helping you
>
> On Tuesday, June 19, 2018 at 3:08:59 PM UTC-4, Alexander Joseph wrote:
>>
>> I've posted this before but havent gotten any response. If more
>> information is needed let me know a
). If you can share the code I am happy to work with you on
> either tutorial.
>
> I'm sorry, I don't have any tutorials to point to - I've been doing this
> for a long time and just pieced it together from the underlying components.
>
> Kirby
>
>
>
> On Tuesday, J
ny tutorials to point to - I've been doing this
> for a long time and just pieced it together from the underlying components.
>
> Kirby
>
>
>
> On Tuesday, June 19, 2018 at 5:13:19 PM UTC-4, Alexander Joseph wrote:
>>
>> Thanks very much!
>>
>> I've
Hey Kirby,
Any ideas on where I should take this next? Thanks
On Thursday, June 21, 2018 at 10:12:41 AM UTC-6, C. Kirby wrote:
>
> Ok, this is good to work with. Let us tackle this issue by issue. The
> first issue is that your modal is not showing up. I see several possible
> issues:
>
>
I'm trying to use django-breadcrumbs
(http://django-bootstrap-breadcrumbs.readthedocs.io/en/latest/) which looks
like it works with function-based views the way I'd like to implement
breadcrumbs, but I'm using exclusively class-based views. I'm still newer
to django so not sure how I can use
er doesn't know how to encode the files
>
> Regards,
>
> Andréas
>
> 2018-05-03 18:44 GMT+02:00 Alexander Joseph <alexander.v.jos...@gmail.com>
> :
>
>> I'm using CBVs and trying to upload a file with a FileField. It seems to
>> work in admin but not i
Not even sure if you can do it this way. I'm thinking theres another way
like overriding the save or the form_valid function in the view... but I'm
trying to use a variable from my instance in my upload path for my file
field. If I should do something like override the save method in the view
I'm using CBVs and trying to upload a file with a FileField. It seems to
work in admin but not in my template. It doesnt give any errors when
creating the record and it saves the rest of the data in the form, but it
doesnt save the attachment
Heres my model
class
...
design_document = models.FileField(upload_to=upload_path, blank=True)
but for some reason my %Y/%m/%d/ no longer works. If I take out the
%Y/%m/%d/ it works but if I leave it in it throws an exception. Does
anyone know why?
On Thursday, May 3, 2018 at 2:50:02 PM UTC-6, Alexander Joseph wrote
>
> On Thu, May 3, 2018 at 3:20 PM Alexander Joseph <alexander...@gmail.com
> > wrote:
>
>> Actually I figured this out... kind of
>>
>> You have to make a method for assigning the upload path in the model..
>> something like
>>
>> def
a9d61e19fea%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/53d50894-98f7-4d92-a1c2-0a9d61e19fea%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
Best Regards,
Alexander Joseph
--
Y
nitial={'project': self.object, 'is_milestone': True},
>
> )
>
>
>
> def get_context_data(self, **kwargs):
>
> context = super().get_context_data(**kwargs)
>
> del context['object']
>
> project = self.object # type: models.Project
>
> context['has_milestones'] = proje
So I changed the link to the button as you suggested, and put the static
modal in the gaas_wafer_design_list.html file, and commented out the
javascript at the bottom, and the modal is showing up as it should now.
Heres my gaas_wafer_design_list.html file, highlighted with the changes
{%
I've been working on a Purchase Order app but I'm getting a little confused
how I'm going to put it all together.
I have 3 models -
class PurchaseOrder(models.Model):
po_number = models.IntegerField(default=get_po_number, unique=True)
po_date = models.DateField()
invoice_number =
I'm building a Purchase Order app that uses a ForeignKey for Vendors. I
want to be able to use another ForeignKey for invoices once a Vendor is
selected. So the choices of Invoices would get filtered based on the users
selection of the Vendor. How would I do this in the model? I assume I'd
e when a model is saved/created and then
> update the subtotal in the PurchaseOrder. See here for information about
> signals: https://docs.djangoproject.com/en/2.0/topics/signals/
>
> Andréas
>
> 2018-08-02 19:27 GMT+02:00 Alexander Joseph >:
>
>> I've been workin
I'm trying to make an employee clock-in/clock-out app but running into some
problems.
Here is my model...
class ClockPunch(models.Model):
employee = models.ForeignKey(settings.AUTH_USER_MODEL)
date = models.DateField(auto_now_add=True)
punched_in =
Hello,
I have a model ...
class PurchaseOrder(models.Model):
po_number = models.IntegerField(unique=True)
and a function ...
def get_po_number(self, *args, **kwargs):
if not self.id:
last_po = PurchaseOrder.objects.order_by('po_number').last()
if last_po:
context. In C++ and Java it would be like the
> `this` pointer. So you wouldn't generally pass "self" to a class member.
>
> Hope that helps!
>
> On 7/23/2018 1:39 PM, Alexander Joseph wrote:
>
> Hello,
>
> I have a model ...
>
> class PurchaseOrder(
ber of objects then add
> the new record
>
> On Tue, 24 Jul 2018, 02:55 Alexander Joseph,
> wrote:
>
>> Thanks Michael and Gerald. With an auto key field or primary key field
>> would users still be able to input their own value? And if so how would I
>> be able to g
Also- this is assuming you're using CBVs, if youre just using FBVs its
probably even easier on the view side, the model side would be the same
On Tuesday, July 10, 2018 at 10:23:51 AM UTC-6, Alexander Joseph wrote:
>
> Good question - I'm looking for a similar solution myself. My appli
Good question - I'm looking for a similar solution myself. My application
is a purchase order app so that a purchase order has details about the
purchase order but also has an unspecified number of objects that belong to
it (purchase items).
The only way I can think this MIGHT work is making a
I'm trying to think of how I would make a purchase order app, where the
purchase order itself has its details/information (vendor name, shipping
type, payment terms, etc.) but it also has an unspecified (could be 1,
could be 10, could be 20) actual purchase items with their own
it
which field to use to relate to in a RDBMS sense.
On Tuesday, July 10, 2018 at 11:30:00 AM UTC-6, aditya wrote:
>
> I am using CBVs in model.py file and FBVs in views.py file.
> As in image :-
>
> On Tue, Jul 10, 2018, 10:29 PM Alexander Joseph > wrote:
>
>> Also- th
I think the solution is above my head at the moment. I'll have to look back
into it once I get better at Django. Thanks for your help though
On Tuesday, February 27, 2018 at 7:26:22 AM UTC-7, Alexander Joseph wrote:
>
> Is there a way to make a form field or model field either a forei
;
> Dylan
>
>
>
> On Wed, Feb 28, 2018 at 9:42 AM, Alexander Joseph <alexander...@gmail.com
> > wrote:
>
>> I'd like to create a CBV to allow users to copy a record, except for item
>> specific information. - I'm making a fixed assets app and if there are 2
Hello, is there a way to make an if statement that is based on whether you
are running in development mode or production mode? Or based on which
settings file you are using?
My app allows users to login with their office365 account instead of with
django allauth and I'd like to only give them
I dont know what that means
On Monday, April 23, 2018 at 7:49:25 AM UTC-6, larry@gmail.com wrote:
>
> On Mon, Apr 23, 2018 at 9:34 AM, Alexander Joseph
> <alexander...@gmail.com > wrote:
> > Hello, is there a way to make an if statement that is based on whether
&
; Did you write the app?
>
> On Mon, Apr 23, 2018 at 9:55 AM, Alexander Joseph
> <alexander...@gmail.com > wrote:
> > I dont know what that means
> >
> > On Monday, April 23, 2018 at 7:49:25 AM UTC-6, larry@gmail.com
> wrote:
> >>
Whats the best way to implement breadcrumbs in a django template? I'd like
something that will track where the user came from and can offer putting
the link back in something like an
Thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
I recently setup a django development environment at home on Windows the
same way I've done 100 times and for some reason it is ridiculously slow
and uses close to 100% of the disk space when I run the server in the
command line. I dont know what could be causing it. Has anyone else had
this
It was Malwarebytes. I had both installed concurrently before but
apparently they dont work well together now. I uninistalled Malwarebytes
and its working fine now
On Sunday, March 25, 2018 at 7:36:19 AM UTC-6, Alexander Joseph wrote:
>
> I recently setup a django development envir
model = FixedAsset
template_name = 'administration/fixed_assets/fixed_asset_form.html'
def get_initial(self):
initial = super().get_initial()
initial["manufacturer"] = fixed_asset.pk.manufacturer
return initial
And this is my url
url(r'^fixed_assets/copy/(?P\d+)
Is there a way to make a form field or model field either a foreign key
reference or allow the user to fill in something themselves? I'm making a
fixed assets app and each fixed asset has an owner field, which I would
like to assign to an app user if possible, and if not possible be able to
for your reply
On Tuesday, February 27, 2018 at 7:45:51 PM UTC-7, Mike Dewhirst wrote:
>
> On 28/02/2018 1:26 AM, Alexander Joseph wrote:
> > Is there a way to make a form field or model field either a foreign
> > key reference or allow the user to fill in something themselve
I'd like to create a CBV to allow users to copy a record, except for item
specific information. - I'm making a fixed assets app and if there are 2 of
the same laptop I'd like the user to be able to make one record in the
database, then copy it minus the serial number and asset tag number which
84 matches
Mail list logo